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. UNIX for Dummies Questions & Answers
Hi Unix Forum,
I have a relatively easy question i suppose for which, however, until now i could not find a solution.
I am working with a program that will give me an output file similar to the following:
A
1
2
3
4
B
1
2
3
4
C
1 (9 Replies)
Discussion started by: Leander
9 Replies
3. Shell Programming and Scripting
I have a text file with the geneIds separated by space in each line. The number Ids in lines are different.
The file is like:
abc qwe tyu ghj jkl dfg sdf
cvb sdk fgh tyu
uio iop tyu rty eru wer rty iop
asd sdf dfg fgh zxc
I want to format the file like:
abc
qwe
tyu
ghj
jkl
... (7 Replies)
Discussion started by: sammy777
7 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
I have a file containing rows with the following format.
Field1|Field2|Field3|data1:data data2:data data3:"dataA:data dataB:data" data4:data:data (and so on)
I need to format the above row into multiple rows that look like this:
Field1|Field2|Field3|data1|data
... (2 Replies)
Discussion started by: newreverie
2 Replies
6. UNIX for Dummies Questions & Answers
Hello gurus,
I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4:
NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies
7. Shell Programming and Scripting
Hi all,
I require to convert julian date to normal calander date in unix
for eg julian date=122
now i want corresponding calander date
----------------------------------------
gr8 if give very small command/script
and please explain the steps as well(imp)
Thanks
... (3 Replies)
Discussion started by: RahulJoshi
3 Replies
8. Shell Programming and Scripting
Hi,
I am new to UNIX. Can some one help me to solve the below.
I have a requirement to to identify the specific fields in row and also some part of the field.
In my file I have a record as
sundra;10.44.48.65;10thstreet TCP packet out of state: First packet isn't SYN;telno:... (3 Replies)
Discussion started by: suneel.mekala
3 Replies
9. Shell Programming and Scripting
I have . dat file which contains data in a specific format:
0 3 892 921 342
1 3 921 342 543
2 4 817 562 718 765
3 3 819 562 717 761
i need to compare each field in a row with another field of the same column but different row and cont the... (8 Replies)
Discussion started by: Abhik
8 Replies
10. Shell Programming and Scripting
Hi there,
I've an input file1 as follows:
1001
1002
1003
1004
1005
I would like to have an output file2 as follows:
Numbers are 1001/ 1002/ 1003/ 1004/ 1005/
Any help is appreciated. (2 Replies)
Discussion started by: kbirde
2 Replies