I want to create a script with cat EOL but when I paste the code in terminal will hang wit error: cat: -: Input/output error. I want just the paste content of the script not to execute grep commands. This line gives me issues
cat >> /etc/script << EOF
....
if [ -z "`ps axf | grep \${PID} | grep -v grep`" ]; then
...
EOF