Hi,
I am trying to create a shell script b.sh inside a shell script a.sh. Now, I need to execute the command inside b.sh on another server and pick the values of that server. But i am unable to do the same.
(snippet of code)
Now what I need is when b.sh is created, it should have the same text inside it. But what is happening is it is replacing $HOME , $3 and $4 when a.sh is executed.
Example:
b.sh has[/code]
ant -q -buildfile /root/work/build.xml 2
[/code]
whereas it should have
So that when b.sh is executed on some other server, it picks the values from that server.
Please let me know how to do this?
I am trying to create a shell script b.sh inside a shell script a.sh. Now, I need to execute the command inside b.sh on another server and pick the values of that server. But i am unable to do the same.
(snippet of code)
Code:
cat > "$1/$2.sh" << EOF
#! /bin/bash
ant -q -buildfile $HOME/$3/build.xml $4
Now what I need is when b.sh is created, it should have the same text inside it. But what is happening is it is replacing $HOME , $3 and $4 when a.sh is executed.
Example:
b.sh has[/code]
ant -q -buildfile /root/work/build.xml 2
[/code]
whereas it should have
Code:
ant -q -buildfile $HOME/$3/build.xml $4
Please let me know how to do this?