Jump to content
  • Announcements

    • admin

      PBS Forum Has Closed   06/12/17

      The PBS Works Support Forum is no longer active.  For PBS community-oriented questions and support, please join the discussion at http://community.pbspro.org.  Any new security advisories related to commercially-licensed products will be posted in the PBS User Area (https://secure.altair.com/UserArea/). 
Gabe Turner

Command history in qmgr

Recommended Posts

Though, like many, I would like to see qmgr use readline to support things like command history and alternate key bindings (vi keys? yes please), I thought I'd share a work-around that I've been using:


Install rlwrap (which wraps things in readline), and alias qmgr to 'rlwrap qmgr'.





Share this post

Link to post
Share on other sites

This is somewhat _old news_, but still worth making sure people know.. qmgr history (and editing) is available as of PBS Professional v12.2. See a snippet from the manual below:


Quote Reusing and Editing the qmgr Command Line 

You can reuse or edit qmgr command lines. The qmgr command maintains a history of commands entered, up to a maximum of 500. You can use the ‘history’ command to see a numbered list of commands, and the !<n> command to execute the line whose number is n. You must not put any spaces between the bang (“!”) and the number. For example, to execute the 123rd command, type the following:


You can see the last m commands by typing ‘history m’. For example, to see the last 6 commands, type the following:

history 6 

You can use the up and down arrows to navigate through the command history list, and the left and right arrows to navigate within a command line. Within a command line, you can use emacs commands to move forward and backward, and delete characters.

You can edit the qmgr command line using the backspace and delete keys, and you can insert characters anywhere in a command line.

History is maintained across qmgr sessions, so that if you start qmgr, then exit, then restart it, you can reuse your commands from the previous session. If you exit qmgr and then restart it, the command lines are renumbered.

If you enter the same command line more than once in a row, only one occurrence is recorded in the history. If you enter the same command line multiple times, but intersperse other command lines after each line, each occurrence is recorded.

Each user’s history is unique to that user on that host.

In the case where an account runs concurrent sessions, the most recent logout of a session overwrites history from previous logouts. For example, if two people are both logged in as root and using qmgr, the second person to log out overwrites the history file.



Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now