Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 12th, 2007, 2:00 PM   #1
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 190
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Sed & Awk

What are these? They sound pretty cool and I'd like to get to grips with them

Can someone give me a link or explain to me how to get started please? I already use Linux.

Thanks very much!
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jul 12th, 2007, 3:05 PM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
There are built into most Linux distros. Just type the command with the arguments and you're on your way!
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jul 12th, 2007, 3:55 PM   #3
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 190
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Thanks for the reply!!!

I've typed in both sed and awk separately and all I get is a list of words and a bit of text about reporting bugs. Is it possible to actually use this?

Thanks!
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jul 12th, 2007, 4:08 PM   #4
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Well, since sed and awk are both CLI scripting languages, you must specifiy what exactly you want to do with them.

Example
grep b* filename
This would list all of the files in the working directory that start with the letter b.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jul 12th, 2007, 5:19 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I'm thinking that a trip to the man pages, or to Google, would answer more questions in one trip than you might expect to achieve in a 40-post forum thread. Just a thought, of course. Inefficient farbling around might be more enjoyable, if you're into that sort of thing.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 13th, 2007, 8:32 AM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,464
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
sed, awk, vi ... if you want to write scripts in unix/linux learn them.

See these lists for examples:
http://www.student.northpark.edu/pem...d/sed1line.txt
http://www.student.northpark.edu/pem...k/awk1line.txt
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jul 13th, 2007, 9:04 AM   #7
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 190
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
IR: Thanks for the advice! I'll give them a go as I think I'm going to get into Linux now.

DaWei: Of course! Inefficient farbling is 100% cool!

What are the man pages? Of course I could google the answer but when I could farble inneficiently what's the point?
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jul 13th, 2007, 1:46 PM   #8
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,464
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
man = manual

run this at the linux prompt

man sed
man awk
man vi

pressing the space bar or down arrow should let you scroll the content
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jul 13th, 2007, 4:29 PM   #9
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 190
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Thanks for this. I'm giving it a go now.

My version of Slackware just got seriously noobed up. I deleted my Kubuntu partition because I had loads of unnecesary stuff and decided to reinstall Kubuntu so made the necessary partitions and gave Kubuntu 8GB. The installation failed and now the LILO boot loader doesn't work. Good job I made a boot floppy. Any suggestions on how I can get the boot loader working again. Anything would be great! Thanks!
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC