The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Grep commands in loop karthikn7974 Shell Programming and Scripting 0 04-28-2008 06:16 AM
help with find & grep commands moe2266 UNIX for Dummies Questions & Answers 2 07-25-2007 12:18 PM
Unix Find commands scooter17 UNIX for Dummies Questions & Answers 1 09-11-2006 11:55 AM
Where do I find what commands I can use? JCWorkman UNIX for Dummies Questions & Answers 3 12-12-2001 03:10 PM
find commands? hallrobe UNIX for Dummies Questions & Answers 3 09-26-2001 12:27 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 03-18-2007
Registered User
 

Join Date: Feb 2007
Posts: 12
find and grep commands

I'm having trouble with the following commands

i. count the number of lines which end in a 4 letter word
grep '[a-z-A-Z]{4\}$' bfile <<seems to print out everything

abc abc abcd
joe joe john
bob bill
gregory greg
greg gregory

the grep command prints out the lines with 4 letter words and the line "greg gregory"

ii. count the number of lines that
contain a number larger than or equal to 100,
contain exactly 5 characters

iii. find all the files in a hierarchy which contain more than 25 characters

Last edited by StrengthThaDon; 03-18-2007 at 04:02 PM.
Forum Sponsor
  #2  
Old 03-18-2007
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,248
The way you have phrased your question would suggest that this a homework assignment. If this is the case, then you would have violated the forum rules.
  #3  
Old 03-18-2007
Registered User
 

Join Date: Feb 2007
Posts: 12
They aren't homework questions per se, they're questions given in preparation for a test; so they aren't graded, but I guess ultimately you're the moderator and its your word against mine.
  #4  
Old 03-18-2007
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,248
When your tutor gave you these questions I am sure that their intention was that you attempt to answer the problems on your own, rather than to post here in the hope that other people might answer them for you.
Try putting in the effort yourself and perhaps you might find that you retain the knowledge better and score higher.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:04 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0