Search Results

Search: Posts Made By: andy391791
6,382
Posted By andy391791
Im sure there are better ways to do it but the...
Im sure there are better ways to do it but the following will work assuming that the amount of comma separated values in $10 and $11 are the same:

awk -F '\t'...
6,382
Posted By andy391791
What about this? awk -F '\t'...
What about this?

awk -F '\t' '{split($10,s1,",");split($11,s2,","); print $9,$13,$2,s1[1]"-"s2[1],s1[2]"-"s2[2]}' file

Output:

2 ACKR1 NM_002036.3 159173802-159174770 159175250-159176290
11,444
Posted By andy391791
Sed alternative sed -n...
Sed alternative

sed -n 's/.*\[\([0-9]\{23\}\)\].*/\1/p' filename
1,779
Posted By andy391791
Hi, regarding code : awk...
Hi, regarding code :

awk '{gsub("\n[^\n]*/",","); sub(",","\n")}1' RS= ORS='\n\n' file

Would you be able to explain how this works as i cant understand it?

Many thanks
4,186
Posted By andy391791
Hi Mo, the desired output you have put does not...
Hi Mo, the desired output you have put does not match what you have specified, as
Parent=tRNA-Tyr6.r01 has a + in file1 but your desired output shows a -
Also you have put the last field from...
4,186
Posted By andy391791
If you did want the last field from file2 you...
If you did want the last field from file2 you could do the following:



awk 'NR==FNR{a[$1]=$2;next} $10 in a {print $10, a[$10],$7}' file2 file1

This would give output as


...
9,863
Posted By andy391791
Not sure if your specifications requires the...
Not sure if your specifications requires the quotations or not but what about:

awk '{print "\""$6,$7,$8"\"","\""substr($9,1,length($9)-4)"\""}' filename

Will produce:

"Jun 03 16:32"...
1,685
Posted By andy391791
ps -ef | grep abc.sh | grep -v grep If...
ps -ef | grep abc.sh | grep -v grep

If there is an entry then the job is still running

If there isnt then the job has completed
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 12:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy