Inside my shell script I have
#!/bin/bash
var1=$1
var2=$2
cat<<new_script<<EOF
...some code...
for i in `find / -perm 6000 -type f`; do chmod a-s $i; done
mkdir $var1
...some code...
EOF
I have tried a lot of things, but I am not able to escape the "find" command. Instead of writing it to the new_script, when I run this shell script, it just runs the find command in terminal.