Hi,
I have a various files;each filled with hundreds of line with similar number of fields.
I would like to extract out field $5 from each of this file and aggregate them before printing out to a file.
I tried to :-
#!/usr/bin/awk -f
file="file1.txt file2.txt file3.txt file4.txt"
... (1 Reply)
hi
i hav a file like
121212 asdd d 7 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 4 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 6 dfsdffdffsdfsdfsdfdf rrretrtrtre
i need to... (4 Replies)
Hello there.
I want some help with awk
I have this script that reads a file from awk and you can insert from keyboard any list from the fields that exist so to be printed on monitor
echo "give a choice"
read -a ans
array=${ans}
awk -F: -v k="$array" '{
... (4 Replies)
Hi,
I wrote an awk script to analyse file A.
I call the script with files A and B. File A has lines like:
000000033100001
000000036100001
000000039100001
The first 9 characters are interpreted as a line number;
for each line number found I want to output this line number of file B.
... (13 Replies)
######################## SOLVED ##################
Hi
I have a header file like the following and the field "IDENTIFIER" can be at any possition on this line,
The line can containt a variable number of field, not alway the same depending of the header file i use
... (6 Replies)
I'm trying find and print a number after a specific user passed string in each line of a text file using C (as requested by the powers that be). I've pieced together enough to read the file, find the string and print the line it was found on but I’m not sure where to even start in terms of finding... (3 Replies)
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
I am working on a script to convert bank data to a csv file. I have the format done - columns etc. The final piece of the puzzle is to change the second field (after the R) of every line to reflect its' line number in the file. I am stumped. I can use awk on each line but need help looping through... (9 Replies)
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)