UNIX TUTORIALS - Unix - Basic Utilities
Unix - Basic Utilities
ADVERTISEMENTS
The pr Command:
Option | Description |
---|---|
-k | Produces k columns of output |
-d | Double-spaces the output (not on all pr versions). |
-h "header" | Takes the next item as a report header. |
-t | Eliminates printing of header and top/bottom margins. |
-l PAGE_LENGTH | Set the page length to PAGE_LENGTH (66) lines. Default number of lines of text 56. |
-o MARGIN | Offset each line with MARGIN (zero) spaces. |
-w PAGE_WIDTH | Set page width to PAGE_WIDTH (72) characters for multiple text-column output only. |
ADVERTISEMENTS
Sending Email:
Option | Description |
---|---|
-s | Specify subject on command line. |
-c | Send carbon copies to list of users. List should be a comma-separated list of names. |
-b | Send blind carbon copies to list. List should be a comma-separated list of names. |
ADVERTISEMENTS
The pr Command:
pr option(s) filename(s)
$cat food Sweet Tooth Bangkok Wok Mandalay Afghani Cuisine Isle of Java Big Apple Deli Sushi and Sashimi Tio Pepe's Peppers ........ $
$pr -2 -h "Restaurants" food Nov 7 9:58 1997 Restaurants Page 1 Sweet Tooth Isle of Java Bangkok Wok Big Apple Deli Mandalay Sushi and Sashimi Afghani Cuisine Tio Pepe's Peppers ........ $The lp and lpr Commands:
$lp food request id is laserp-525 (1 file) $The lpstat and lpq Commands:
$lpstat -o laserp-573 john 128865 Nov 7 11:27 on laserp laserp-574 grace 82744 Nov 7 11:28 laserp-575 john 23347 Nov 7 11:35 $
$lpq laserp is ready and printing Rank Owner Job Files Total Size active john 573 report.ps 128865 bytes 1st grace 574 ch03.ps ch04.ps 82744 bytes 2nd john 575 standard input 23347 bytes $The cancel and lprm Commands:
$cancel laserp-575 request "laserp-575" cancelled $
$cancel laserp request "laserp-573" cancelled $
$lprm 575 dfA575diamond dequeued cfA575diamond dequeued $Sending Email:
$mail [-s subject] [-c cc-addr] [-b bcc-addr] to-addr
$mail -s "Test Message" admin@yahoo.com
Hi, This is a test . Cc:
$mail -s "Report 05/06/07" admin@yahoo.com < demo.txt
$mail no email