10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the tab-delimited input below I am trying to use awk to -10 from $2 and +10 to $3. Something like
awk -F'\t' -v OFS='\t' -v s=10 '{split($4,a,":"); print $1,$2-s,$3+s,a,$5,$6} | awk {split(a,b,"-"); print $1,$2-s,$3+s,b-s,b+s,$5,$6}' input
should do that. I also need to -10 from $4... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. 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
3. Shell Programming and Scripting
Hi All,
I have a file where a list of email id's are stored as shown below:
emailid1@blh.com emaild2@blh.com asdf@blah.com emailid3@blh.com
In my shell script, i am sending emails to above id's
My requirement is to seperate the email id's into 2 groups..
emailid1@blh.com... (10 Replies)
Discussion started by: galaxy_rocky
10 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
Hello;
I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies
6. Shell Programming and Scripting
Hi all,
I have a .vcf file which contains 8 coulmns and the data under each column as shown below,
CHROM POS ID REF ALT QUAL FILTER INFO
1 3000012 . A G 126 ... (6 Replies)
Discussion started by: mehar
6 Replies
7. Shell Programming and Scripting
Hello,
I'm trying to get a value based on a comparison of two fields, this is:
file1
687.45
687.18
687.322
687.405
686.865
file 2
685 6.43
686 6.43
687 6.42
688 6.42 (3 Replies)
Discussion started by: Gery
3 Replies
8. 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
9. Web Development
Have a column "address" which is combination of city, region and postal code like.
Format is : city<comma><space>region<space>postal code
abc, xyz 123456
All these three city, region and postal code are not mandatory. There can be any one of the above. In that case a nell... (2 Replies)
Discussion started by: rakshit
2 Replies
10. Shell Programming and Scripting
I have a variable with data in this format
field1;field2;field3
I wanted to split the variable like this
field1
field2
field3
this statement was working fine echo $key_val | awk '{gsub(";" , "\n"))'
but sometimes we get the data in the variable in this format... (3 Replies)
Discussion started by: mervin2006
3 Replies