problem with shell script execution

Hi All,

i am running a shell script in which there is a command

`ps -ef | grep smon > db`

When i execute this command in the command prompt i am getting the desired output..but when the script is executed..the db file is getting created but with no values...I could not find the reason for it. Please help. This is really urgent .

Thanks in Advance
Anju

Are you trying to store this somewhere why are you using backticks there.
just remove backticks and try. if you are storing it in a variable then just remove the redirection part.:slight_smile:

Try this..

ps -ef|grep "smon" >db or ps -ef|grep smon >db