The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Emergency UNIX and Linux Support !! Help Me!!
.
google unix.com



Emergency UNIX and Linux Support !! Help Me!! Post your urgent questions here for highest visibility. Posting a new thread to this forum requires Bits. We monitor this forum to help people with emergencies, but we do not guarantee response time or answers. This forum is "best effort" only. Members who reply to posts here receive a bonus of 1000 Bits per reply.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search for string in a file and extract another string to a variable daikeyang Shell Programming and Scripting 6 03-20-2009 08:45 PM
How to search a string in a file. prathap UNIX for Dummies Questions & Answers 1 07-17-2007 03:41 AM
String search in log file sliver Shell Programming and Scripting 1 07-12-2006 08:09 AM
appending string to text file based on search string malaymaru Shell Programming and Scripting 1 06-09-2006 09:53 AM
please help me to search string in a file ...... swamymns Shell Programming and Scripting 2 02-01-2006 12:20 PM

 
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 Display Modes
Prev Previous Post   Next Post Next
  #8 (permalink)  
Old 11-03-2009
ahmad.diab's Avatar
ahmad.diab ahmad.diab is online now
Registered User
  
 

Join Date: May 2008
Location: Amman Jordan in MEA
Posts: 253

Code:
awk '!/Not/ && /Ok to Proceed/ && NR==15{print "" > "Go.txt"}' file

the above code means:-
if the row does not contain "NOT" && contain "Ok to Proceed" && the row number ==15 then do
print "nothing" and send it to "GO.txt" file


---------- Post updated at 07:36 AM ---------- Previous update was at 07:34 AM ----------

Quote:
Originally Posted by ahmad.diab View Post
Code:
awk '!/Not/ && /Ok to Proceed/ && NR==15{print "" > "Go.txt"}' file

the above code means:-
if the row does not contain "NOT" && contain "Ok to Proceed" && the row number ==15 then do
print "nothing" and send it to "GO.txt" file
last sentence means create GO.txt

---------- Post updated at 07:36 AM ---------- Previous update was at 07:36 AM ----------

Quote:
Originally Posted by ahmad.diab View Post
Code:
awk '!/Not/ && /Ok to Proceed/ && NR==15{print "" > "Go.txt"}' file

the above code means:-
if the row does not contain "NOT" && contain "Ok to Proceed" && the row number ==15 then do
print "nothing" and send it to "GO.txt" file


---------- Post updated at 07:36 AM ---------- Previous update was at 07:34 AM ----------



last sentence means create GO.txt
and the file path is the current path.
 

Bookmarks

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




All times are GMT -4. The time now is 09:09 AM.


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