Search Results

Search: Posts Made By: lsantome
1,025
Posted By Don Cragun
With a question like this, it is ALWAYS a good...
With a question like this, it is ALWAYS a good idea to tell us what operating system and shell you're unison. With a POSIX conforming shell, you could try something like:
#!/bin/ksh
last=""
while...
1,025
Posted By vbe
A hint: while read VAR1 VAR2 do echo...
A hint:

while read VAR1 VAR2
do
echo $VAR2 " " $VAR1
done<your_file

With the above you should be able to figure out the next step...

Cheers
1,197
Posted By RudiC
Do those input files share the column 1 values?...
Do those input files share the column 1 values? If so, did you consider the join command?
1,850
Posted By bartus11
Try:echo "Enter INPUT:" read INPUT echo...
Try:echo "Enter INPUT:"
read INPUT
echo "Enter OUTPUT:"
read OUTPUT
cut -f1-4 $INPUT | sed 's/hello/goodbye/g' | sort -uV > $OUTPUT
1,076
Posted By SriniShoo
looks like the below line from the expect output...
looks like the below line from the expect output is incorrect
chr1 153234602 155205669 GBA 1971067
it should be
chr1 155205331 155205669 GBA 338
If my assumption is true, below code...
1,076
Posted By Scrutinizer
You could first print an empty line when column 4...
You could first print an empty line when column 4 is not "hom". Then pipe that output to another awk which uses empty lines as a record separator then the start is in $2 (field 2) and the last is in...
2,556
Posted By MadeInGermany
awk '{s[$2]=$0; c[$2]++} END {for (i in s) print...
awk '{s[$2]=$0; c[$2]++} END {for (i in s) print s[i],c[i]}' *.tabBy indexing with field $2, a duplicate is overwritten in array s, and further increases the count in array c. Array s simply stores...
2,556
Posted By MadeInGermany
A quick hack is to directly print the 1st line of...
A quick hack is to directly print the 1st line of each file, and proceed with the next cycle.
awk 'FNR==1 {print; next} ...
You need GNU awk or nawk or Posix awk for that.
Showing results 1 to 8 of 8

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