linux - How to get standard output from subshell? -
i have script this?
command='scp xxx 192.168.1.23:/tmp' su - nobody -c "$command" the main shell didn't print info. how can output sub command?
you can of output redirecting corresponding output channel:
command='scp ... ' su - nobody -c "$command" > file or
var=$(su - nobody -c "$command") but if don't see anything, maybe diagnostics output of scp disabled? there "-q" option somewhere in real command?
Comments
Post a Comment