06-18-2010
Thanks a ton Chanchal!!!!!
The awk statement works perfectly and my currently directory path will always remain the same.
Have a great weekend..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have 50 columns are there, want to exctract 9 columns only.These are not there in sequence.
How can i do it. (2 Replies)
Discussion started by: ashokkumar83
2 Replies
2. Shell Programming and Scripting
Hello all
I have a question on displaying log
When i am redirecting the output to a log, it displays but in a format which i am not happy about. Can i give any explicit commands which says to display the above log at specific row and column
I want to do this for each line of the log
What is... (2 Replies)
Discussion started by: vasuarjula
2 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I've got a file like this:
a 1 0 0 0 1 0 0 1 1 3 3 1 4 4 4
b 1 0 0 0 1 4 4 1 3 1 1 4 4 2 2
c 1 0 0 0 2 0 0 3 3 1 3 1 1 2 4
d 1 0 0 0 2 0 0 1 1 0 0 4 4 2 4
The file has ~4200 entries. I need to exclude those columns that are zeros for all those rows that have 2 in column 6. For... (0 Replies)
Discussion started by: zajtat
0 Replies
4. 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
5. Shell Programming and Scripting
Hey guys
I have got a tab-separated file and I want to copy only selected records from two columns at a time satisfying specified condition, and create a new file.
My tab separated file is like this
ID score ID score ID Score ID score ID score
1_11 0.80 2_23 0.74 2.36 0.78 2_34 0.75
A_34... (9 Replies)
Discussion started by: jacks
9 Replies
6. Shell Programming and Scripting
hi! i have two files that looks like this
file 1:
ABS 123 456
BCDG 124 542
FGD 459 762
file 2:
ABS 132 456
FGD 459 762
output would be:
from file1:
ABS 132 456
BCDG 124 542
from file 2:
ABS 132 456 (4 Replies)
Discussion started by: kingpeejay
4 Replies
7. Shell Programming and Scripting
Can I transform input like the below ?
Note: Insert zeros if there is no value to transform.
Input
key name score
key1 abc 10
key2 abc 20
key1 xxx 100
key2 xxx 20
key1 zzz 0
key2 zzz 29
key3 zzz 129
key1 yyy 39output
abc ... (1 Reply)
Discussion started by: quincyjones
1 Replies
8. Shell Programming and Scripting
0400903071220312 20120322 20:21
1TRANTELSTRAFLEXCAB22032012CMP201323930000812201108875802100A003485363 12122011AUS 182644 000C2
8122011 0000 000
1TRANTELSTRAFLEXCAB22032012CMP201323930000812201108875802100A003485363 12122011AUS ... (6 Replies)
Discussion started by: rammm
6 Replies
9. UNIX for Beginners Questions & Answers
I have to ascend the number of two selected columns by horizontal manner.
For example, I have a data like this in csv file (tab delimited format)
08 1 19185 18010
16 4 7960 9339
01 6 516769 517428
09 9 51384 49270
I need to ascend the two columns numbers (horizontal manner) like as... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
IGAWK(1) Utility Commands IGAWK(1)
NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO
gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)