Print this page

 

Sometimes translation issues can result in ^M symbols appearing throughout a file.  To remove them from a file, edit it with vi and then enter the following command:

:%s/<CTRL V><CTRL M>//g

 

To preprend text to every line of a file, enter the following in vi:

 

:%s/^/<text>

 

Tp append text to every line of a file, enter the following in vi:

 

:%s/$/<text>

 

To strip all the trailing whitespace from every line of a file, enter the following from the command line:

 

cat input.file | sed 's/[ \t]*$//' > output.file

 

Autocompletion of file name on command line: <Esc>\

Direct a command to runmqsc:

echo "dis qlocal (*)" | runmqsc <queue manager> > output.file

Count number of channels running:

echo "dis chs (*)" | runmqsc <queue manager> | grep -v grep | grep RUNNING | wc -l