I just had to post this. Sorry if it is stupid. I just write a little
shell function which was inspired by a Tech Tip on page 56 of the Dec 2008
Linux Journal magazine. I call it "smart_cat" because it does the
equivalent of a "cat" command, but invokes the appropriate command based
on the last qualifier of the input file name to, hopefully, properly
process the file (e.g. uncompress it). I source this in my .bashrc
file.
function smart_cat()
{
local i
for i in "$@";do
case "$i" in
*.gz) zcat "$i"
*.bz2) bzcat "$i"
*.lzma) lzcat "$i"
*.Z) zcat "$i"
*) cat "$i"
esca
done
}
--
Q: What do theoretical physicists drink beer from?
A: Ein Stein.
Maranatha!
John McKown
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390