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 > There's an awk in my grep, and it wont let me out.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-17-11, 18:51
binarybyzantine binarybyzantine is offline
Registered User
 
Join Date: Jan 2011
Posts: 5
There's an awk in my grep, and it wont let me out.

Any clue why,

grep -B1 "`awk '{print $10}' FILEA`" FILEB

would produce the right output, stand alone and when run in a script, but when in a script results in a;

grep: (*data in field 10): No such file or directory

error? Even though it produces the right output, it ends aborts the scripts after the error....

suggestions?
Reply With Quote
  #2 (permalink)  
Old 01-18-11, 03:27
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
I am unable to recreate your problem on my system
Reply With Quote
  #3 (permalink)  
Old 01-18-11, 07:38
binarybyzantine binarybyzantine is offline
Registered User
 
Join Date: Jan 2011
Posts: 5
Hmmm

I'm running a bash terminal in OSX, but the script it's in is csh.
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