I have a file with columns which are separated by tabs and spaces like
I need to write a AWK commmand , to search for a pattern in column 1 eg "111" and replace the value in column 5 with say "7kk" , I tried the assignment $5="7kk" , but if I print the line {print $0} , the column are separated only by spaces, but I want to retain the original format.
Can anyone please help me with this
Last edited by Yogesh Sawant; 03-31-2009 at 04:35 AM..
Reason: added code tags
I Have Two Files, A And B. How Can I Rewrite Them Into A New File With The Following Pattern?
File A
123
456
789
File B
235
478
987
Become
123 235
456 478
987 789
Thanks In Advance!! (8 Replies)
HI Pros,
I have a issue.I need to write a script to parse the logs got from syslog server and update the same in my database.I need the following output.I donot know perl and I heard it very easy to write in perl
I have the sample log I need each column seperated by commas and all equals... (0 Replies)
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Hi,
I have the following sample file
32895901-d17f-414c-ac93-3e7e0f5ec240 AND @GDF_INPUT
73b129e1-1fa9-4c0d-b95b-4682e5389612 AUS @GDF_INPUT
40f82e88-d1ff-4ce2-9b8e-d827ddb39447 BEL @GDF_INPUT
ffbcc6fe-ba35-489c-ae08-e70e8897aa23 BEL @FF_INPUT... (3 Replies)
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
Hey folks. I wrote a little awk script that summarizes /proc/net/dev info and then pipes it to the nix column command to set up column spacing appropriately.
Here's some example output:
Iface RxMBytes RxPackets RxErrs RxDrop TxMBytes TxPackets TxErrs TxDrop
bond0 9 83830... (3 Replies)
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Dear Experts,
Kindly help me please to get the average from column 14 and to write the value at the last field., But we need to take as reference the column 16., example the first 4 lines has the same value in column 16, therefore I want ot get the average only for these lines in column 14. And... (2 Replies)
Hello,
I looking for a simple way to write into a file in column, e.g:
I've a file contains below:
1
And I wish add another number from another command something like this:
1 2
I hope have been clear. I would be able to display these values but I cannot write :confused:
Regards,... (3 Replies)