10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
can someone spot what i'm doing wrong here:
awk 'BEGIN{printf("%0.2f", 1 / 2649320) * 100}'
i get this error:
awk: line 1: syntax error at or near *
then i do this and get the answer i'm trying to avoid:
awk 'BEGIN{print(1 / 2649320) * 100}'
3.77455e-05 (7 Replies)
Discussion started by: SkySmart
7 Replies
2. UNIX for Dummies Questions & Answers
I have to apologize for my ignorance so this question is probably stupid.
How does awk process a file? Does it read from top of input file to end of file going line by line?
Yoda helped me create an awk script that helps me parse the named.conf file and output it into a .csv file but when... (8 Replies)
Discussion started by: djzah
8 Replies
3. Shell Programming and Scripting
I have a file of sites and each site has a variable number of flow values with a date for each value. I want to determine the max value of flow for each site and output the site number, max value, and date of max value.The format structure (simplified) is the following:
Record Site Number ... (5 Replies)
Discussion started by: cparr
5 Replies
4. UNIX for Dummies Questions & Answers
I have a script which uses awk to read from a file seperated with commas, although saved as a .conf file.
awk -F, '{print $3}'
it is meant to pick up "a label here" (for example)
But instead return "a"
Problem is that although the command does recognise the comma seperation it still... (1 Reply)
Discussion started by: Pedro72
1 Replies
5. UNIX for Dummies Questions & Answers
Hi Guys,
I got stuck to a a point where I need to find the value for (4 to the power of -2 upto 8 places after decimal ....
4^(-2) ; the result I need is upto 8 places after decimal.
How is that possible?
Thanks a lot!! (2 Replies)
Discussion started by: Indra2011
2 Replies
6. Shell Programming and Scripting
Hi,
I am using sub to remove blank spaces and one pattern(=>) from the input string. It works fine when I am using two sub functions for the same. However it is giving error while I am trying to remove both spaces and pattern using one single sub function.
Working:
$ echo " OK => " |awk... (2 Replies)
Discussion started by: sai_2507
2 Replies
7. Shell Programming and Scripting
Why does this work:
awk -v s="this is a string" 'index($0, s)' file
while the following doesn't?
s="this is a string"
awk -v s=$s 'index($0, s)' file
How do I search for a string with spaces in it?
---------- Post updated at 01:18 AM ---------- Previous update was at 01:15 AM ----------... (0 Replies)
Discussion started by: locoroco
0 Replies
8. Shell Programming and Scripting
hlow all,
need your advice
i have sample.txt
1252468812,yahoo,3.5
1252468812,hotmail,2.4
1252468819,yahoo,1.2
1252468812,msn,8.9
1252468923,gmail,12
1232468819,live,3.4
1252368929,yahoo,9.0
1252468929,msn,1.2now i want filtering with awk so output will like this
12524_log.txt... (2 Replies)
Discussion started by: zvtral
2 Replies
9. Shell Programming and Scripting
Hi,
I need to process a file as below. Could you please help to achieve that using awk/sed commands.
Input file:
---------------
AB | "abcdef 12345" | 7r5561451.pdf
PQRST | "fghfghf hgkjgtjhghb ghhgjhg hghjghg " | 76er6ry.pdf
12345 | "fghfgcv uytdywe bww76 jkh7dscbc 78 : nvchtry hbuyt"... (0 Replies)
Discussion started by: viveksr
0 Replies
10. Shell Programming and Scripting
Hi Masters,
___________________________________________________________________________________
Group of orthologs #1. Best score 3010 bits
Score difference with first non-orthologous sequence - yeast:3010 human:2754
YHR165C 100.00% PRP8_HUMAN 100.00%... (16 Replies)
Discussion started by: mskcc
16 Replies