Dear LP Members,
I am a bit confused. I am creating a script using BASH shell in which i need to append some text to another file and that text has to be closed in with backquotes(`).
Code: Select all
file=/firewall/mrtg/ids.ips
dir=/firewall/mrtg/cfgs
shdir=/firewall/mrtg/scripts
cat $file | while read ids
do
id=`echo $ids | awk '{print $2}'`
ip=`echo $ids | awk '{print $1}'`
touch $dir/$IP.cfg
echo "Target[tc.class]: $shdir/$IP.sh" >> $dir/$IP.cfg
done
`/firewall/mrtg/scripts/172.16.10.15.sh`
but it is not i am unable to set these backquotes. it is being appended like
/firewall/mrtg/scripts/172.16.10.15.sh
without backquotes.
Please help me out in setting up these backquotes.