If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > fetching the few lines from a file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-08, 02:12
lakshmi_manasa lakshmi_manasa is offline
Registered User
 
Join Date: Nov 2008
Posts: 2
Post fetching the few lines from a file

Hi,

I wanted to write a shell script to fetch few contents from a file and to be placed in anew file

suppose my file :abc20081105 it has some logs(errors) i wanted to get the lines

olny errorlogs.

Hope u understood this...

appreciate if u can solve it..

Thanks

lakshmi manasa
Reply With Quote
  #2 (permalink)  
Old 11-06-08, 03:59
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Try looking at the grep command.
Reply With Quote
  #3 (permalink)  
Old 11-09-08, 01:53
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
If Mike's advice isn't enough, you'll have to provide an input and output example.
Reply With Quote
  #4 (permalink)  
Old 11-10-08, 08:47
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool Show us some code

Quote:
Originally Posted by lakshmi_manasa
I wanted to write a shell script to fetch few contents from a file and to be placed in anew file
And why don't you write the script?
.
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On