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
Extraction of various lines from a hugh file srsahu75 Shell Programming and Scripting 5 05-07-2008 08:17 AM
Shell script for text extraction from a file vignesh53 Shell Programming and Scripting 3 02-05-2008 08:16 AM
Report file extraction based on Date range ganapati Shell Programming and Scripting 2 07-13-2006 11:26 AM
date-extraction from a file in KSH homer_hn Shell Programming and Scripting 6 04-21-2006 01:51 AM
Help with tar extraction! manthasirisha Shell Programming and Scripting 4 03-17-2006 07:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-01-2001
apalex apalex is offline
Registered User
  
 

Join Date: May 2001
Location: NY
Posts: 39
Unhappy

Hello,

Im trying to extract a portion of a big file.
Using unique pattern /occurrence ,
(ex. loginname1,logoff and loginname2,logoff ),
I like to print the lines that contain the patterns and the lines between them.
Also, create a file for every login occurrence.

Thanks for everyone's help. Good day.
  #2 (permalink)  
Old 05-01-2001
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,668
egrep -e PATTERN logfile > file

Where PATTERN is a regular expression that extracts the lines you want; logfile is the logfile, of course; and file is the same of the particular file for the user in the pattern.

All you have to do now is get a book on regular expresions and work on the syntax
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 09:37 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