The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-15-2001
rachael rachael is offline
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
  #2 (permalink)  
Old 10-15-2001
g-e-n-o g-e-n-o is offline
Registered User
  
 

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

Posts: n/a
Bits: 0 [Banking]
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'.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0