AnotherAlan
Technical User
Hi all,
I am attempting to insert a line to a start up script across a range of servers.
I have a working command, at least it works from the command line, but I am receiving command garbled messages when attempting to run from within a script. I guess this has to do with the new line requirements...maybe?
The script and command is as follows;
#!/bin/ksh
script=/tmp/test/etc
date=`date +%d-%m-%y`
for h in `cat etc_server`
do
ssh -n $h "cp ${script} ${script}.${date};sed '{
9a\
<two tabs here for formatting only> rm /petc/log/etcprocs
}' < ${script}.${date} > $script"
done
I know there is a uuoc here, but this is only testing..!!!
Can anyone suggest a better / working alternative to this?
All help much appreciated,
Thanks
Alan
I am attempting to insert a line to a start up script across a range of servers.
I have a working command, at least it works from the command line, but I am receiving command garbled messages when attempting to run from within a script. I guess this has to do with the new line requirements...maybe?
The script and command is as follows;
#!/bin/ksh
script=/tmp/test/etc
date=`date +%d-%m-%y`
for h in `cat etc_server`
do
ssh -n $h "cp ${script} ${script}.${date};sed '{
9a\
<two tabs here for formatting only> rm /petc/log/etcprocs
}' < ${script}.${date} > $script"
done
I know there is a uuoc here, but this is only testing..!!!
Can anyone suggest a better / working alternative to this?
All help much appreciated,
Thanks
Alan