Why cant I pipe into runmqsc?

I tried using cat /opt/mqm/samp/amqscos0.txt | sudo -u mqm runmqsc COLIN and it failed, complaining about su syntax.

I solved it by

sudo -u mqm cat /opt/mqm/samp/amqscos0.txt | sudo -u mqm runmqsc COLIN

Easy when you know how!

5 thoughts on “Why cant I pipe into runmqsc?

  1. This may work as well:

    sudo -u mqm “runmqsc COLIN < opt/mqm/samp/amqscos0.txt"

    The quotes may not be required, I do my have sudo to try with.

    Like

  2. When I run the original command, it works fine, apart from having to use the extension ‘.tst’ instead of ‘.txt’.

    I’d be curious to know what error you got!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s