Sed does not work in expect
- by Sharjeel Sayed
I made this bash one-liner which I use to list Weblogic instances running along with their full paths.This works well when I run it from the shell.
/usr/ucb/ps auwwx | grep weblogic | tr ' ' '\n' | grep security.policy | grep domain | awk -F'=' '{print $2}' | sed 's/weblogic.policy//' | sed 's/security\///' | sort
I tried to incorporate this in an expect script
send "echo Weblogic Processes: ; /usr/ucb/ps auwwx | grep weblogic | tr ' ' '\n' | grep security.policy | grep domain | awk -F'=' '{print \$2}' | sed 's/weblogic.policy//' | sed 's/security\///' | sort ; echo ; echo\r"
but I got this error sed: -e expression #1, char 13: unknown option to `s'
Please help