|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi:
I'm trying to exucute a command inside a shell script. It is not working. However when i run the same command at the command line it works fine. I'm sending the code snippet and also sending error message. If any of you have an idea of what might be causing the problem, please help me. if [ -n "${FILENAME}" ] then echo "\nCounting messages for event type ONE 11111 ..." ConCommand="find . -name '$FILENAME' -exec grep -l $PATTERN '{}' /dev/null \;" echo "\nConCommand -->$ConCommand<--" VarResult=`$ConCommand` echo "\n$VarResult" else The error I'm getting is find: incomplete statement I even tried to escape the "\" in the command. Even them I'm having the same problem. Thanks, SB |
|
#2
|
|||
|
|||
|
Change the command from -
ConCommand="find . -name '$FILENAME' -exec grep -l $PATTERN '{}' /dev/null \;" To ConCommand=`find . -name '$FILENAME' -exec grep -l $PATTERN '{}' /dev/null \;` |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > command inside the ksh script not working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|