LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 11-07-2009, 01:23 PM   #16
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 686
Thanked: 47

[Log in to get rid of this advertisement]
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.
macos Telemachos is offline     Reply With Quote
Old 11-07-2009, 06:17 PM   #17
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 1,815
Blog Entries: 5
Thanked: 116
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..
linuxfedora ghostdog74 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
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
Help Strip / Remove attachments (Replace with TXT file if Possible) Vince0000 Linux - General 0 07-29-2004 01:17 PM
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 12:59 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration