Search Results

Search: Posts Made By: Raghav Garg
6,343
Posted By Raghav Garg
I tried Scrutinizer method one more time using...
I tried Scrutinizer method one more time using nawk instead of awk and it worked and giving me desired output as well.
I really appreciate your help on this and you did really great but it might me...
6,343
Posted By Raghav Garg
First think is, I am copying down the script...
First think is, I am copying down the script which you gave and saving it in my script, changing the data file to the file which I want to use for verification.
Screenshot - Attempt One.

Than I...
6,343
Posted By Raghav Garg
I am running what you just suggested and also its...
I am running what you just suggested and also its nawk version but getting an error :- -v: not found

I know that I am making this tough for all the people helping me around.
Much Thanks to...
6,343
Posted By Raghav Garg
This works without any error but with no output,...
This works without any error but with no output, I need to have the file name from this process so that I can use them in the next set of process.

#!/bin/ksh


nawk -v P1="ST.820" -v P2="RITE...
6,343
Posted By Raghav Garg
I did that as well but same result. #!/bin/ksh ...
I did that as well but same result.
#!/bin/ksh

awk -v P1="ST.820" -v P2="RITE AID" '
# set A if P1 found, set B if P2 found
0~P1{A=1} $0~P2{B=1}
# If filename changes, and A set, and B set,...
6,343
Posted By Raghav Garg
I did and with same syntax error, I think either...
I did and with same syntax error, I think either I am missing something basic here or it is my system limitations.
Here is what I tried:-
awk -v P1="ST.820" -v P2="RITE AID"
# set A if P1 found,...
6,343
Posted By Raghav Garg
I am using this command:-awk 'FNR==1{p=1}...
I am using this command:-awk 'FNR==1{p=1} /ST\*820/{p=0} !p && /RITE AID/{print FILENAME}' natriter820u.20140914 but getting an error.
awk: syntax error near line 1
awk: bailing out near line 1
...
6,343
Posted By Raghav Garg
Thanks, I will try and see if it works.. my...
Thanks, I will try and see if it works.. my company is using a pretty old version so I have a limited number of possibilities

---------- Post updated at 03:37 PM ---------- Previous update was at...
6,343
Posted By Raghav Garg
Thanks Rudic, I will correct the first mistake...
Thanks Rudic, I will correct the first mistake here also I am very new to Unix, will it be possible for you to provide me the with the right command that you think should work with tr -d '\n'
8,171
Posted By Raghav Garg
I just need the file name having both of these...
I just need the file name having both of these patterns but line break is posing a problem I believe.
6,343
Posted By Raghav Garg
GREP function in ksh which ignores LINE Breaks
Hello

I am using a grep command with two patterns in my KSH script. File has line breaks in it and both the patterns are in different lines. Here is the command grep -l 'RITE AID.*ST.820'...
8,171
Posted By Raghav Garg
GREP function in ksh which ignores LINE Breaks
I am using a grep command with two patterns in my KSH script. File has line breaks in it and both the patterns are in different lines. Here is the command - grep -l 'RITE AID.*ST.820'...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy