Search Results

Search: Posts Made By: gina.lizar
1,175
Posted By Don Cragun
The following seems to do what you want: awk ' ...
The following seems to do what you want:
awk '
$3 == "gene" || $3 == "protein_coding_gene" {
end = index($NF, ";")
id = ";gene_id=" substr($NF, 4, end - 4)
}
$3 == "exon" {
$0 = $0 id
}...
1,483
Posted By Corona688
Is it just a really slow awk script? Or is there...
Is it just a really slow awk script? Or is there hundreds of gigabytes of data? Splitting it in 25 won't speed up a slow disk.

Does it make sense to split up the input data into sections? Is...
1,483
Posted By bartus11
Try:LINES=`wc -l Input.file | awk '{print...
Try:LINES=`wc -l Input.file | awk '{print int($1/25)}'`
split -dl$LINES Input.file Input.file
mv Input.file /somewhere/else

for file in Input*; do
./gina.awk $file > out_$file &
done

cat...
5,856
Posted By vgersh99
sed -e 's/ */\t/1;s/ */\t/1' myFile
sed -e 's/ */\t/1;s/ */\t/1' myFile
1,640
Posted By Yoda
Use tr to delete carriage returns: tr -d '\r' <...
Use tr to delete carriage returns:
tr -d '\r' < inputfile > outputfile
1,357
Posted By Yoda
Try this: awk ' FNR == 1 { ...
Try this:
awk '
FNR == 1 {
c += 1
d = FILENAME
sub ( /\/.*/, X, d )
D[c] = d
}
{
...
1,357
Posted By Yoda
Here is an awk approach that might work: awk ' ...
Here is an awk approach that might work:
awk '
FNR == 1 {
c += 1
}
{
A[c,FNR] = $5
m = m < FNR ? FNR : m
}
...
1,601
Posted By ahamed101
Did you check the result1.txt? Anyways, try...
Did you check the result1.txt?
Anyways, try this



#!/bin/bash

data[0]=""
key[0]=""
count=0

search_add()
{
inkey=$1;indata=$2;action=$3
if [ $action == ADD ]; then
...
1,601
Posted By ahamed101
Not very clean though but try this. You can...
Not very clean though but try this.
You can optimize it to some extend depending on which ever file you think might be bigger.
The highlighted part is what you were asking for, the substring logic....
1,265
Posted By vgersh99
awk 'ORS=(NF==2)?FS:RS' myFile
awk 'ORS=(NF==2)?FS:RS' myFile
1,265
Posted By Akshay Hegde
$ awk 'NF==2{s=$0;next}NF==1{$0 = s FS $0}1' file
$ awk 'NF==2{s=$0;next}NF==1{$0 = s FS $0}1' file
1,265
Posted By Corona688
awk -F"\t" -v OFS="\t" 'NF==2 { A=$0 ; getline ;...
awk -F"\t" -v OFS="\t" 'NF==2 { A=$0 ; getline ; print A,$0 }' inputfile > outputfile
1,917
Posted By Yoda
Here is an awk program based on some assumptions:...
Here is an awk program based on some assumptions:
awk '
NR == FNR {
if ( $0 ~ /\[[A-Z]*\]/ )
D = $0
else
...
Showing results 1 to 13 of 13

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