Hi,
I have a file in the following format.I need to sort the file according to 2nd column and third last column.
If all the claim numbers (second column) are paid. Third last column =P , they need to be printed in a file called as paid.txt
If all the claim numbers (second column) are denied. Third last column =D , they need to be printed in a file called as denied.txt
If the claim numbers (second column) are paid or denied (combination of both) Third last column =P OR Third last column =D , they need to be printed in a file called as mixture.txt
Input file
Output files would look something like this Paid.txt
Denied.txt
Mixture.txt
Ane help will be greatly appreciated!
Last edited by Scrutinizer; 01-09-2013 at 04:15 PM..
Reason: Changed icode tags to code tags
Hi Experts,
I am trying to get system output to capture inside awk , but not working:
Please advise if this is possible :
I am trying something like this but not working, the output is coming wrong:
echo "" | awk '{d=system ("date") ; print "Current date is:" , d }'
Thanks, (5 Replies)
Hi experts,
I have a simple problem .I have a awk file which reads data from the text file, into a variable.There are some entries in the file which are duplicate.Is there a way in awk to eliminate the duplicate entries.
PLANNAME = substr($0,228,60)
printf("\t Please keep this notice. It... (6 Replies)
Helo Experts
I have bunch of lines like below :
I'd like to convert every "non zero-like digit" so it multiplied by 8. The results should be like :
I know awk can solve this , but I'm just a newbie.
TIA (7 Replies)
I have a script problem that I am not able to solve due my very limited understanding of unix/awk.
This is the contents of test.sh
awk '{print $1}'
From the prompt if I enter:
./test.sh Hello World
I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Lets say I have program named "programA"
and you run like below
programA uniquecallerID somefilename
which will grep out something like this
------------somefilename-----------
asdfasdfasdf
asdfasdf
callIDabc
asdfd
sdfd
callIDabc
sdrsdf
sdfasdfsadfdsf
asdfasdfasdfasdfasdf (6 Replies)
I have question about awk if someone can help me here. I want to find a string (file has just one row) and then get the position of the column.
let say i have 4 columns
a b c d
Look for b and somehow get the column position in this case b is at $2 script doesn't know what is the position... (9 Replies)
I have the following error:
ls -lt | awk 'BEGIN NR > 1 { print $2, $9 }'
Syntax Error The source line is 1.
The error context is
BEGIN >>> NR <<< > 1 { print $2, $9 }
awk: 0602-500 Quitting The source line is 1.
What I want to do is ls a directory, skip the first... (3 Replies)