![]() |
Interacting with the Operating System Using PASS |
SheerPower's pass
statement lets you run external
shell commands from within your program. This is useful for
interacting with the operating system, calling utilities, or
generating files for use in clusters.
The pass
statement takes a string expression as
its argument. This string is passed to the operating system as a
shell command.
This example writes a directory listing to a file named
listing.txt
.
The pass
statement also supports an optional modifier:
nowait
.
NOWAIT: Runs the command in the background without waiting. Useful for launching external tools without blocking execution.
This launches the Windows calculator and immediately resumes program execution.
This example uses the Windows tasklist
utility to find
all running Chrome processes, saves the output to a CSV file for analysis, and loads
it into a SheerPower cluster for further processing.
@
in
filespec$("@chrome.csv")
refers to the path of the
currently running program. The output file will be placed in the
same directory as the .sprun
or .spsrc
file.
pass
statement lets you
easily run shell commands from within a SheerPower application. It
connects your program to OS data, like system processes, and
enables using system command line tools.
Hide Description
|
|
Enter or modify the code below, and then click on RUN |
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |