Possible Duplicate:
Storing output of command in shell variable
How can I put the result of jps | awk '$2~/Bootstrap/{print $1}' into a variable so that I can use with other commands?
Possible Duplicate:
Storing output of command in shell variable
How can I put the result of jps | awk '$2~/Bootstrap/{print $1}' into a variable so that I can use with other commands?
Wrap it in $( ... )
xyzzy=$(jps | awk '$2~/Bootstrap/{print $1}')
echo $xyzzy
this creates a subshell the output of which is captured into xyzzy.