10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My code fails to do anything if I've BEGIN block in it:
Run the awk script as:
awk -f ~/bin/sum_dupli_gene.awk make_gene_probe.txt
#!/usr/bin/awk -f
BEGIN {
print ARGV
#--loads of stuff
}
END{
#more stuff
} (14 Replies)
Discussion started by: genome
14 Replies
2. Shell Programming and Scripting
data.txt:
NEWTEXTS="frq=63,std=-0.00533584,time=Mar-21-(09:15:03)-2016,epoch=1458576903,avg=64.2059,212.698
frq=197,std=0.587585,time=Mar-21-(09:16:02)-2016,epoch=1458576962,avg=64.2059,483.756
frq=178,std=0.503514,time=Mar-21-(09:46:02)-2016,epoch=1458578762,avg=64.2059,500... (5 Replies)
Discussion started by: SkySmart
5 Replies
3. Shell Programming and Scripting
Hello,
I need a little help with the following:
I'm using AWK to read input from a comma-seperated value file, and only printing certain fields like so:
awk -F "," '{print $1,$3,$6}' /list.csv | tail -1
Which outputs the following:
server1 APPID OS
I run into a problem... (8 Replies)
Discussion started by: LinuxRacr
8 Replies
4. Shell Programming and Scripting
HI all,
I have data in a file that looks like this:
1 HOW _ NNP NNP _ 3 nn _ _
2 DRUGS _ NNP NNP _ 3 nn _ _
3 ACT _ NNP NNP _ 0 null _ _
4 : _ ... (3 Replies)
Discussion started by: owwow14
3 Replies
5. Shell Programming and Scripting
Hi dear users,
I need to compare numeric columns in two files. These files have the following structure.
K.txt (4 columns)
A001 chr21 9805831 9846011
A002 chr21 9806202 9846263
A003 chr21 9887188 9988593
A003 chr21 9887188 ... (2 Replies)
Discussion started by: jcvivar
2 Replies
6. Shell Programming and Scripting
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!! (3 Replies)
Discussion started by: leo.maveriick
3 Replies
7. Shell Programming and Scripting
Hi,
I'm working with gawk (on DOS) today.
A goal is: find a string for-instance '123', cut a line in two columns and write second one. The problem is: command line works OK, awk file doesn't. But I would like to work with file because there are many strings to find.
input:
line command:
awk... (4 Replies)
Discussion started by: frajer
4 Replies
8. Shell Programming and Scripting
I have several files with say something like
cat
sparrow
I can grep for "cat" and "sparrow" and usually the output is one below the other
cat
sparrow
How can I view these as columns say
Pets Birds
cat sparrow
Would be great if this can be on command line using awk or... (1 Reply)
Discussion started by: gubbu
1 Replies
9. Shell Programming and Scripting
Here's the command I'm running:
# echo "hi" | awk '{etime = system("hostname") ; close("hostname") ; print etime""}'
And here's the ouput:
server.domain.tld
0
Why in the world is that second line, the one that's just "0", there? Many thanks in advance. (2 Replies)
Discussion started by: treesloth
2 Replies
10. UNIX for Dummies Questions & Answers
Hello,
My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns:
File A: (tab-delimited)
PDB CHAIN Start End Fragment
1avq A 171 176 awyfan
1avq A 172 177 wyfany
1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies