Unix Shell - Re: Useful use of cat

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > January 2006 > Re: Useful use of cat





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Useful use of cat
Darren Dunham

2006-01-04, 8:49 pm

In comp.unix.solaris Sven Mascheck <cus.u.mascheck@spamgourmet.com> wrote:

> Promising a "useful use of cat award"?



> - embedded cat
> ( cmd; cat file; cmd ) | cmd
> Useful for me once on a Redhat, where man(1) otherwise annoyingly
> would intersperse the output with headers and footers:
> (echo -e ".pl 1100i"; cat $1; echo ".pl \\n(nlu+10\n") | tbl | nroff -man

[...]

> <http://www.in-ulm.de/~mascheck/various/uuoc/>


The last one on that page (not posted in your list) is the most common
for me. Using cat to hand a pipe rather than a file to a non-largefile
aware filter:

% gzip <largefile>
vs
% cat <largefile> | gzip

--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com