I have a shell script which when executed works fine, but gives a warning:
sh: #: unknown operand In this shell script, I want to comment out the processes namely "process1" and "process2", which are also shell scripts designed for other tasks, and after commenting them out, I want to transfer the contents of path1 to a file in path2
#!/bin/sh rootpath="/opt/storage" datestring=`date +"%y-%m-%d"` touch newfile1 touch newfile2 autorun_contents=`cat FILE1` if [ ! -f ${FILE1} ] || [ -z "`echo \"${FILE1}\" | tail -10 | grep EOF`" ]; then echo "Something was wrong with the file" return fi sed "s/.\/process1/# .\/process1/g" FILE1 > FILE2 | echo "Hi1" sed "s/.\/process2/# .\/process2/g" FILE1 > FILE2 | echo "Hi2" Any suggestions would be greatly appreciated. Thanks!
1 Reset to default