Previous - Up - Next

15.5   Using the Pipe Command

The pipe command, which only is available on Unix hosts, lets you send the output of a Simics command to a shell command through a pipe:

simics> pipe "help" "grep Tracing"

This will run help (which lists all Simics commands categories) and send its output to the standard input of the grep trace process. grep will discard all lines not containing "Tracing" and forward the rest to its standard output, which will be printed on the Simics terminal.

The pipe command can be used to send all the output of a command to a file:

simics> pipe "stepi 1000" "cat > trace.txt"

Or you can use it to view information using the shell command more:

simics> pipe "pregs -all" more

Note that you have to enclose both the Simics command (the first argument) and the shell command (the second argument) in double quotes if they contain whitespace or other non-letter characters.

A related command is !, which runs a shell command from the Simics prompt:

simics> !uname -a

This will run the uname -a shell command and print its output in the Simics console.

Previous - Up - Next