I am trying to set a command into a variable in a csh script using command substituion with ``. I am having a problem with ps command combined with grep. The command is as follows (shows processes running with the word gpts in them).
/usr/ucb/ps axwww | grep gpts
this works fine at the command prompt but I get an error "set: No match" when trying to use it in a csh script as follows
set PS1=`/usr/ucb/ps axwww | grep gpts`
echo $PS1
It works fine for other commands such as ls -la | wc, entered as follows
set LIS=`ls -la | wc`
echo $LIS
Anyone with any ideas with what's wrong with the first command? I have tried substituting a variable for gpts but that didn't work either