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
Grepping the last 30 minutes of a log file... jtelep Shell Programming and Scripting 2 03-05-2008 09:27 PM
grepping for period . in file name ? ie grep . bobk544 UNIX for Dummies Questions & Answers 5 11-30-2007 11:31 PM
Grepping Errors in a file achararun Shell Programming and Scripting 4 02-05-2007 12:36 AM
Loop and grepping into a file skotapal Shell Programming and Scripting 3 08-26-2002 06:28 PM
grepping the first 3 characters from a file g-e-n-o UNIX for Dummies Questions & Answers 2 10-15-2001 03:11 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-15-2001
Registered User
 

Join Date: Oct 2001
Posts: 25
Lightbulb grepping the first 3 characters from a file

give this a try and let me know if it works

grep '^[a-z][a-z][a-z]' filename


rachael
Forum Sponsor
  #2  
Old 10-15-2001
Registered User
 

Join Date: Oct 2001
Posts: 9
it doesn't, return the whole line, guess the only way is grep then cut
  #3  
Old 10-15-2001
sskb
Guest
 

Posts: n/a
this does not give what you expect i think.

i tried it.. but got different things in different files.. and think.. it gives you lines which do not contain 'a' or 'z'.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:19 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