bash - unable to run commands in shell script after su mqm command,but able to run in putty?Pleae let me know how to execute.? -


my script is,

#!/bin/bash  su mqm echo "display qlocal (<queuename>) curdepth" | runmqsc queuemanager 

same command works in putty not through script.

putty interactive command line. try below. bash variables can used.

#!/bin/bash su - mqm -c "echo 'display qlocal (<queuename>) curdepth'|runmqsc queuemanager" 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -