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

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -