10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following script that will average the last two fields of each row, but im not sure how to include the 3rd field of the following row.
An example of the analysis that I need to perform from the input - (66.61+58.01+54.16)/3
awk '{sum=cnt=0; for (i=13;i<=NF;i++) { sum+=$i; cnt++... (1 Reply)
Discussion started by: ncwxpanther
1 Replies
2. Shell Programming and Scripting
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies
3. Shell Programming and Scripting
Hi All,
I have the input as below:
cat input
032016002 2.891 97.109 16.605 27.172 24.017 32.207 0.233 0.021 39.810 0.077 0.026 19.644 13.882 0.131 11.646 0.102 11.449 76.265 23.735 16.991 83.009 8.840 91.160 0.020 99.980 52.102 47.898 44.004 55.996 39.963 18.625 0.121 1.126 40.189... (15 Replies)
Discussion started by: am24
15 Replies
4. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
5. Shell Programming and Scripting
hi,
i have a variable which contains some file names separated by comma. example
FNAME="abc.txt,def.txt,ghi.txt"
i want to extract each filename and store it into an array and also count the number of files in the array.
file=abc.txt
file=def.txt
file=ghi.txt
i thought of using the... (8 Replies)
Discussion started by: Little
8 Replies
6. Shell Programming and Scripting
How to store the content from array to either "row-column" or "column-row" order? (0 Replies)
Discussion started by: kavi.mogu
0 Replies
7. Shell Programming and Scripting
Hi
I want to write a script which store all the parameters passed to the script into an array.
Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD.
I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies
8. Shell Programming and Scripting
Hi,
the csv file with the delimeter #.
A#B#C#D#E#F#G#H
1#2#3#4#5#6#7#8
Z#x#c#V
7#2#8#9
N.
I want to read the file line by line and store in rowarray.
then the rowarray content should be spilt or made to fields using the delimeter #.
i am not sure can we store the fields in to... (3 Replies)
Discussion started by: barani75
3 Replies
9. Shell Programming and Scripting
Hi,
I have a file that has data in it that says
00:01:48.233 1212
00:01:56.233 345
00:09:01.221 5678
00:12:23.321 93444
The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
Discussion started by: pat4519
2 Replies
10. Shell Programming and Scripting
I need to split a long varible which is a whole line read from a file into fields and store them in an array, the fields are delimited by pipe and a field may contain white spaces.
I tried the following concept test and it has problem with field 5 which contain a space, appearently so because... (3 Replies)
Discussion started by: gratus
3 Replies