[plug] help with sed

Matt Kemner zombie at wasp.net.au
Thu Mar 15 12:37:23 WST 2001


On Thu, 15 Mar 2001, Russell Steicke wrote:

>   ps x |grep foo | sed 's/^\ *([0-9]+).*$/\1/g'

Hi Russell

Replace the + with a * and escape the brackets

ie:

ps x |grep foo | sed 's/^\ *\([0-9]*\).*$/\1/g'

 - Matt




More information about the plug mailing list