Well today, I was trying to do a simple test with Ubuntu. .. that is trying to print the output of the ‘ps -aux‘ command. It wasn’t that bad. The way to do this is to pipe it into the ‘LPR’ that is your printer.
e.g. ps -aux | lpr
This will send the output to your printer for printing. Not hard at all.
For searching, you can use the same piping trick but with the ‘grep’ command after it.
e.g. ps -aux | grep testing
This will search the output for the word testing and listed them out.
To get fancy, you can then send the output of the search results to your printer.
ps -aux | grep testing | lpr
That’s the beauty of Linux. Piping in Linux is very useful.
Related Tech posts:
- How to Find a file by name in UNIX/Solaris/Linux?
- How to cancel or delete a print job that is stuck in the print queue?
- How to add a printer to your printer list in Mac OS X?
- Linux Root Password
- Linux Server for ISPs and Hosters, What should be in it?
- How to add a DNS Suffix Search List to a Windows DHCP server?
- Useful Google Search Commands