LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-08-2007, 04:49 PM   #16
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928

heh. I can sympathise with that :}
 
Old 11-08-2007, 07:19 PM   #17
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Humor
Quote:
Originally Posted by Tinkster View Post
Think of awk as a missing link between sed and perl :}
reminds me of (as quoted at http://linuxgazette.net/issue54/okopnik.html):
Quote:
Never write it in 'C' if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible.
--Taylor's Laws of Programming
Which I think should be updated to:
Quote:
Never write it in 'C' if 'Perl' is enough;
Never drag out 'Perl' if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible.
--Taylor's Laws of Programming, revised
Quote:
If Larry Wall knew how to use awk, he never would have written Perl.
-- WFS

Joke
Quote:
Originally Posted by Tinkster View Post
<BEG>
shouldn't that be "<beg />" -- XHTML standards, you know.


Serious
Quote:
Originally Posted by yitzle View Post
Neat! Thanks!
I didn't even know you could search man (or less, I guess) like that!
Shows why I regularly re-read the man pages for the basics: less, grep, cat, etc. , etc. , etc.

BTW, did you know that you can put "#<name_of_command>" as a URL directly into Konqueror's Address/Location dialog box & get the man page in HTML format?

Last edited by archtoad6; 02-18-2011 at 01:13 PM.
 
Old 11-09-2007, 02:48 AM   #18
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by archtoad6 View Post
Never write it in 'C' if 'Perl' is enough;
Never drag out 'Perl' if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible.
--Taylor's Laws of Programming, revised
Heh. Words of wisdom. ;}

Quote:
If you find yourself using cat with only one argument
you're abusing it.


Cheers,
Tink
 
Old 11-09-2007, 07:29 AM   #19
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Glad you like my revision. I have been looking for the right words to capture flavor of the original, this time I think I either got it or came very close. At least close enough to make it public.

Of course then there are Python & Ruby to work in or combine into a high-level scripting class w/ Perl. . . .
 
Old 08-03-2010, 10:36 AM   #20
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
It's been 21 months, but I just realized the humor in this:
Quote:
Originally Posted by Tinkster View Post
Quote:
If you find yourself using cat with only one argument
you're abusing it.
Cheers,
Tink
Let me explain:
Sometimes for clarity I like to break a long pipeline up & put each "joint" of "pipe" on a separate line. This allows the reader to follow the logic step by step. When I do this, I frequently cat the target file into the pipeline, rather than making it the object of the 1st "real" command.

Since this involves using cat w/ only one argument, does this make me a cat abuser?

Is Patches turning over in his grave?
 
  


Reply

Tags
taylor taylor's+laws



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and JavaScript: problem with echo()-ing unwanted line breaks Robhogg Programming 3 02-12-2007 07:52 AM
ls | echo, I got blank, why can't echo take the 2nd seat in a pipeline? elinuxqs Linux - Newbie 6 11-24-2006 08:25 AM
Bash Script, no new line for echo command jorisb Linux - General 5 11-05-2005 12:08 AM
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 02:59 PM
How to echo variables and commands in one line? hindll01 Programming 1 09-10-2004 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration