enigmasoldier
IS-IT--Management
I am trying to embed newsyslog in a shell script so that I can run a shell script on each host to install it:
I did 'uuencode /usr/local/sbin/newsyslog newsyslog > script.sh'
Then I added this to the top of script.sh:
#!/bin/sh
tempfile=`mktemp`
cat << EOF >> $tempfile
And I added EOF on a line by itsself at the bottom. The second line of uuencoded data has a part like:
M`A0!"`
and the shell is actually trying to execute the data between the `` so it craps out with errors. Is there a way to embed binary files within a shell script? Or is there some way to escape all of the data of the uuencoded binary file?
Thanks for your help
I did 'uuencode /usr/local/sbin/newsyslog newsyslog > script.sh'
Then I added this to the top of script.sh:
#!/bin/sh
tempfile=`mktemp`
cat << EOF >> $tempfile
And I added EOF on a line by itsself at the bottom. The second line of uuencoded data has a part like:
M`A0!"`
and the shell is actually trying to execute the data between the `` so it craps out with errors. Is there a way to embed binary files within a shell script? Or is there some way to escape all of the data of the uuencoded binary file?
Thanks for your help