Useful use of cat

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
GustavoYz
Posts: 883
Joined: Wed 07 Jul 2010, 05:11
Location: .ar

Useful use of cat

#1 Post by GustavoYz »

Found this, really good examples. an ideas too.
http://www.in-ulm.de/~mascheck/various/uuoc/
embedded cat

( cmd; cat file; cmd ) | cmd
A generic method to mix both fixed/existing and dynamic output.

Rather special example: This was useful for me on a Redhat Linux, where man(1) otherwise annoyingly
would intersperse the output with headers and footers for a print version, which is rarely used, though...
I tried: ( echo -e ".pl 1100i"; cat "$1"; echo ".pl \\n(nlu+10\n" ) | tbl | nroff -man

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Didn't know that. Thanks!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Traditionnally, cats are use to hunt mice and make dogs angry. :D
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
GustavoYz
Posts: 883
Joined: Wed 07 Jul 2010, 05:11
Location: .ar

#4 Post by GustavoYz »

musher0 wrote:Traditionnally, cats are use to hunt mice and make dogs angry. :D

:lol:

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#5 Post by Aitch »

Image



embedded cat attached

Aitch :)
Attachments
catcersize.gif
(20.34 KiB) Downloaded 395 times

Post Reply