Answer 3.4

3.4 Using Pipes

Exercise 3b

a2ps -Pljsn019 textfile is the command to convert a text file to postscript (ASCII to ps), and then to send it to the printer ljsn019.

Using pipes, print all lines of list1 and list2 containing the letter 'p', sort the result, and print to the printer ljsn019.

 

Answer

% cat list1 list2 | grep p | sort | a2ps -Pljsn019

 

Attribution: This tutorial was originally designed and written by M.Stonebank@surrey.ac.uk, November 2002; modified by Montek Singh, September 1, 2010.

Creative Commons License
This tutorial is licensed under a Creative Commons License.