POSIX Commands [!]
There is an easy way invoke and execute the Posix shell (SH.HPBIN.SYS). Any command that starts with an exclamation mark “!” is interpreted as a Posix command. If the exclamation mark is the only character entered, Qedit starts the Posix shell. The user has to exit out of the shell to get back in Qedit.
/! #################################### MPE/iX Shell and Utilities (A.50.02) COPYRIGHT (c) Hewlett-Packard Company 1992, All Rights Reserved. #################################### /MYACCT/MYGROUP> exit /
Qedit uses the following command to start the shell:
xeq sh.hpbin.sys info="-L"
If the line contains text after the exclamation mark, Qedit assumes the text is a Posix command. The text is then passed as is to the Posix shell for execution. The shell terminates automatically at the end of execution and returns to Qedit.
/!uname -a #################################### MPE/iX Shell and Utilities (A.50.02) COPYRIGHT (c) Hewlett-Packard Company 1992, All Rights Reserved. #################################### MPE/iX CALVIN C.60.00 C.16.01 SERIES 968LX /
Qedit uses the following command to execute Posix commands:
xeq sh.hpbin.sys info="-L -c 'uname -a'"
Notice the command text is enclosed in single quotes to preserve delimiters. If a command already contains quotes and double-quotes, Qedit automatically doubles them up in the final command. For example,
/!echo "This is 'my' message" #################################### MPE/iX Shell and Utilities (A.50.02) COPYRIGHT (c) Hewlett-Packard Company 1992, All Rights Reserved. #################################### This is 'my' message
Internally, Qedit uses the following command:
xeq sh.hpbin.sys info="-L -c 'echo ""This is ''my'' message""'"
The command text must not contain another exclamation mark. Otherwise, Qedit interprets them as string delimiters and tries to search for the text in the current workfile.