LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-07-2009, 01:23 PM   #16
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59

Quote:
Originally Posted by ghostdog74 View Post
just curious, can you tell me when is the time that sed is better than awk, considering what they both can and cannot do?
One obvious answer is that sed is simpler, i.e. easier to learn.

So for people who don't do a ton of cli or text manipulation, it might make better sense to learn sed in a weekend rather than devote more time to awk.

I should say that I don't have very strong feelings for either one. I tend to use sed for simple things, awk for slightly more complex things, and then Perl or Ruby for proper things. But I think your all-or-nothing approach here is a bit ham-fisted. Nearly every *nix system will have both. There's no need to choose between them.
 
Old 11-07-2009, 06:17 PM   #17
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,695
Blog Entries: 5

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Telemachos View Post
One obvious answer is that sed is simpler, i.e. easier to learn.
easier in what sense? lines of code? regex is easier to learn?

Quote:
Nearly every *nix system will have both. There's no need to choose between them.
yes nearly every *nix have them, but you only need to use awk. this will cut short one's learning curve.

Last edited by ghostdog74; 11-07-2009 at 06:19 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Strip / Remove attachments (Replace with TXT file if Possible) Vince0000 Linux - General 2 09-17-2010 07:46 PM
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 06:11 PM
Read a line in a txt file with bash orgazmo Programming 5 05-03-2005 08:10 AM
Read a line in a txt file with bash orgazmo Linux - Newbie 3 05-03-2005 05:16 AM
PERL:: trying to remove last line of file ocularbob Programming 16 09-01-2003 02:07 PM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration