Flylib.com

Books Software

 
 
 

nawk-pattern scanning and processing language

 <  Day Day Up  >  

nawk ”pattern scanning and processing language

nawk [ F re ] [ v var=value ] [ 'prog' ] [ filename ... ]

nawk [ F re ] [ v var=value ] [ f progfile ][ filename ... ]

nawk scans each input filename for lines that match any of a set of patterns. The command string must be enclosed in single quotes ( ' ) to protect it from the shell. Awk programs consist of a set of pattern/action statements used to filter specific information from a file, pipe, or stdin .

 <  Day Day Up  >  
 <  Day Day Up  >  

newgrp ”logs into a new group

newgrp [] [ group ]

newgrp logs a user into a new group by changing a user's real and effective group ID. The user remains logged in and the current directory is unchanged. The execution of newgrp always replaces the current shell with a new shell, even if the command terminates with an error (unknown group).

 <  Day Day Up  >  
 <  Day Day Up  >  

news ”prints news items

news [ a ] [ n ] [ s ] [ items ]

news is used to keep the user informed of current events. By convention, these events are described by files in the directory /var/news . When invoked without arguments, news prints the contents of all current files in /var/news , most recent first, with each preceded by an appropriate header.

 <  Day Day Up  >  
 <  Day Day Up  >  

nice ”runs a command at low priority

nice [ increment ] command [ arguments ]

/usr/bin/nice executes a command with a lower CPU scheduling priority. The invoking process ( generally the user 's shell) must be in the time-sharing scheduling class. The command is executed in the time-sharing class. An increment of 10 is the default. The increment value must be in a range between 1 and 19, unless you are the superuser. Also a csh built-in.

 <  Day Day Up  >  
 <  Day Day Up  >  

nohup ”makes commands immune to hangups and quits

/usr/bin/nohup command [ arguments ]

There are three distinct versions of nohup . nohup is built into the C shell and is an executable program available in /usr/bin/nohup when using the Bourne shell. The Bourne shell version of nohup executes commands such that they are immune to HUP (hangup) and TERM (terminate) signals. If the standard output is a terminal, it is redirected to the file nohup.out . The standard error is redirected to follow the standard output. The priority is incremented by five. nohup should be invoked from the shell with & in order to prevent it from responding to interrupts or input from the next user .

Example A.39.
nohup lookup &

EXPLANATION

The lookup program will run in the background and continue to run until it has completed, even if the user logs off. Any output generated goes to a file in the current directory called nohup.out .

 <  Day Day Up  >