UNIX pipes and shell scripting for NMRPipe
From NMR Wiki
NMRPipe is a powerful UNIX command-line tool for processing NMR data.
Shell command
In order to use NMRPipe one needs to understand how UNIX shell interprets the command line. The command line accepts commands (of course).
So let's take a look at a command:
nmrPipe -fn PS -p0 -0.0 -p1 0.0 -di
The shell (the blank screen program accepting your typing) will split (there are more details in how shell treats the command line - but we'll skip them now) the line by empty spaces into words.
The first word is the name of the program we want to run - nmrPipe, remaining words are options passed with the program.
If you have nmrPipe already installed and your shell "knows" where nmrPipe can be found in the file system, shell will try to run nmrPipe with the arguments that you provide. I.e. if all is right nmrPipe program will be loaded into the memory and the processor will be set to run through executable instructions.
Input and output
Type the command line above and see what happens.
You should get: NMRPipe Error: input from a terminal: Check for missing input argument. Check for trailing spaces after any "\" line-continuations. NMRPipe Error opening NMR streams. NMRPipe Aborting with null header. NMRPipe Error Status: 1 NMRPipe Function PS
Normally UNIX commands DO accept input from terminal, i.e. keyboard, but nmrPipe won't - it is checks the type of input then quits if the input is coming from terminal.
Ok. Every program in UNIX has three standard data streams "attached" to it by default: standard input (STDIN), standard output (STDOUT), standard error (STDERR). So logically in our case nmrPipe is expecting data from the standard input, which is by default - your keyboard, but for nmrPipe that would be useless - go ahead and type raw nmr data by hand.
NMRPipe is most frequently used toghether with the powerful feature of *NIX operating systems - pipes.