sed & awk | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

sed & awk

Shell Programming and Scripting


Tags
learn unix

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-07-2008
kukuruku kukuruku is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 5 May 2009, 3:31 AM EDT
Location: Moscow, Russia
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
sed & awk

Hi.
I'm going to learn scripting and i have the following topics on the list: sed, awk, shell scripting, perl.

My question is, whehter i should learn sed and awk? Aren't this tools outdated?
Although i see that GNU upgrade it's versions of these tools from time to time.

And, the next question. Would the "Sed & awk" book be useful for reading on the sed topic? It is 1997.

For awk i'm going to read Effective awk Programming by GNU.
Sponsored Links
    #2  
Old 09-07-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 
Join Date: Mar 2008
Last Activity: 28 March 2011, 6:41 AM EDT
Location: /there/is/only/bin/sh
Posts: 3,653
Thanks: 0
Thanked 10 Times in 8 Posts
The sed & awk book is excellent for both. They are useful and stable tools which do not evolve much any more, but are still useful to have around. If you mean to be able to read and understand Unix shell scripts written by others, they are a must. Advanced sed scripting might not be all that useful to know if you are going to be learning awk and Perl anyway, but the basics (substitution, regex matching, maybe simple loops) are used a lot to make up for missing features in the shell.

PS I guess you know both books are available on-line for free?
http://books.google.com/books?hl=en&...result#PPP1,M1
http://www.gnu.org/software/gawk/manual/

Last edited by era; 09-07-2008 at 02:00 PM.. Reason: Links to online editions
Sponsored Links
    #3  
Old 09-07-2008
nani_ynm's Avatar
nani_ynm nani_ynm is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 22 December 2013, 2:55 AM EST
Location: Bangalore
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
thanks for the links era...

Good qns be kukuruku...

My question is, whehter i should learn sed and awk? Aren't this tools outdated?
Although i see that GNU upgrade it's versions of these tools from time to time.

Can somebody ans for the above please...

- nani
    #4  
Old 09-07-2008
ghostdog74 ghostdog74 is offline
Registered User
 
Join Date: Sep 2006
Last Activity: 9 November 2014, 12:24 AM EST
Posts: 2,669
Thanks: 0
Thanked 18 Times in 18 Posts
if you want to choose 1 between the 2 , then learn awk.
Sponsored Links
    #5  
Old 09-08-2008
broli's Avatar
broli broli is offline
Registered User
 
Join Date: Dec 2007
Last Activity: 23 July 2014, 5:32 PM EDT
Location: Argentina
Posts: 219
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by nani_ynm View Post
thanks for the links era...

Good qns be kukuruku...

My question is, whehter i should learn sed and awk? Aren't this tools outdated?
Although i see that GNU upgrade it's versions of these tools from time to time.

Can somebody ans for the above please...

- nani
those tools where created a long time ago, they are old, not outdated !!
there still beeing updated.
they are used alot in linux system scripts
a huge part of the scripts around relay on those

so, is it worth it ? (and pardon the my french) hell yeah

their importance is more clear after you learn how many things they can do

how much in depth you learn depends on what you spect to accomplish
Sponsored Links
    #6  
Old 09-08-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 5 July 2014, 11:14 AM EDT
Location: classification algos
Posts: 3,203
Thanks: 19
Thanked 30 Times in 27 Posts
Quote:
Originally Posted by ghostdog74 View Post
if you want to choose 1 between the 2 , then learn awk.
I would suggest both are important assuming that perl is not in the choice list, had perl been there in the list it would do everything

I feel its quite easier with sed to regex, information extraction etc.

Just my 2 cents
Sponsored Links
    #7  
Old 09-08-2008
Franklin52's Avatar
Franklin52 Franklin52 is offline Forum Staff  
Moderator
 
Join Date: Feb 2007
Last Activity: 22 November 2014, 7:59 AM EST
Location: The Netherlands
Posts: 7,719
Thanks: 123
Thanked 538 Times in 508 Posts
It depends on what you want to do with Unix/Linux but first off, try to master the system utilities: ls, cat, cmp, grep, etc. and learn to use an editor like vi(m). Then, master the shell, you can do a great deal of useful work with just the shell and the utilities.

Once you've learned how to write useful scripts in the shell, try to master utilities like sed and awk.
After that you can think about a program language and that depends on what you want to do.

Regards
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -4. The time now is 08:05 AM.