Hi,
I want to pass a command to a shell script. This command is a grep command. While executing I am getting the following errors, please help:
myscript.sh "egrep 'ERROR|FATAL' \*20100428\*.log | grep -v aString"
myscript.sh is a simple script:
#!/bin/ksh
cd log
$1
the errors are:
egrep: can't open |
egrep: can't open grep
egrep: can't open -v
egrep: can't open aString
Error is because egrap sees |, grep, -v and aString as arguments.