Sed does not work in expect

Posted by Sharjeel Sayed on Stack Overflow See other posts from Stack Overflow or by Sharjeel Sayed
Published on 2010-03-17T12:15:17Z Indexed on 2010/03/17 12:21 UTC
Read the original article Hit count: 430

Filed under:
|
|
|
|

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

© Stack Overflow or respective owner

Related posts about expect

Related posts about sed