execute command hard coded in script not work when its in a variable

Posted by johnnycrash on Stack Overflow See other posts from Stack Overflow or by johnnycrash
Published on 2010-05-27T03:35:04Z Indexed on 2010/05/27 3:41 UTC
Read the original article Hit count: 225

Filed under:
|

this works:

nc shldvgfas005 6155 < temp.6153 

this hangs:

cmd="nc shldvgfas005 6153 < temp.6153"; $cmd

this gives an error:

cmd="nc shldvgfas005 6153 < temp.6153"; "$cmd"

-bash: nc shldvgfas005 6153 <  temp.6153: command not found

HELP!

© Stack Overflow or respective owner

Related posts about linux

Related posts about bash