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
We have a csv file as mentioned below and the requirement is to change the date format in file as mentioned below.
Current file (file.csv)
----------------------
empname,date_of_join,dept,date_of_resignation
ram,08/09/2015,sales,21/06/2016
"akash,sahu",08/10/2015,IT,21/07/2016
... (6 Replies)
Discussion started by: gopal.biswal
6 Replies
3. 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
4. Shell Programming and Scripting
The awk below does put in VUS in the 9th field but I can not seem to skip the header then add the VUS. I tried to incorporate NR >=2 and NR > 1 with no luck. Thank you :).
input
Chr Start End Ref Alt Func.refGene PopFreqMax CLINSIG Classification
chr1 43395635 ... (5 Replies)
Discussion started by: cmccabe
5 Replies
5. Shell Programming and Scripting
Example data
Gi1/10
Gi1/12 xl32lytscb07
3/11 to nyc
3/12 41764 ecomm
3/13 hxcsxsa 2/1
3/14 ziim570-rsvd
3/15 xl3NDSADM
Po1 VPC trunk to xl3-i
Po2 ***DO NOT ENABLE**
Po13 *** VPC link to
Po101
Po102 xl3-2lyg1accsgh-fe... (7 Replies)
Discussion started by: sumguy
7 Replies
6. Shell Programming and Scripting
Hi, i have data in a file f1.txt
a
b
c
d
and i want to print the above column values in single line with a delimiter, say ','
The output should look like:
a,b,c,d
I could find rows to columns help online but not vice versa
Thanks,
-srinivas yelamanchili (4 Replies)
Discussion started by: ysrini
4 Replies
7. Shell Programming and Scripting
Hello,
I want to send tcpflow dump to a TCP port in HEX data, to send with netcat i need to convert to HEX and add \\x before each HEX bytes, to do this i use this line:
tcpflow -i -C dst port | xxd -p | sed 's/../&\\\\x/g;s/ $//' | nc the output on the listening end:... (3 Replies)
Discussion started by: patx
3 Replies
8. Shell Programming and Scripting
I have a file with three fields and field delimiter '|' like:
abc|12:13:45|123
xyz|12:87:32|
qwe|54:21:09
In the file the 1st line has proper data -> abc|12:13:45|123
,the 2nd line doesnt has data for the 3rd field which is okay
, the 3rd line doesnt has data for the 3rd field as well the... (5 Replies)
Discussion started by: mehimadri
5 Replies
9. Shell Programming and Scripting
I wrote script in bash which generates this report:
phrase1;phrase2;phrase3;phrase4;phrase5;phrase6;phrase7;phrase8
phrase9;phrase2;phrase10;phrase4;phrase11;phrase12;phrase13;phrase14
phrase15;phrase16;phrase17;phrase18;phrase19;phrase20;phrase21;phrase22
...
I would like add name only... (3 Replies)
Discussion started by: patrykxes
3 Replies
10. Shell Programming and Scripting
I Have this code
while
do
column1=":`cat /home/test_inter.txt|head -${iCount1}|tail -1|cut -d "," -f2`"
columnA=$columnA$column1
iCount1=`expr ${iCount1} + 1`
done
echo $columnA (2 Replies)
Discussion started by: nvuradi
2 Replies