Hi,
Could anyone please explain why we have arr=1 - what does this statement do?
awk -F\; 'FNR==NR{arr=1;next};$3 in arr' core.txt gmrd.txt
Any help appreciated (2 Replies)
Could someone give me a quick simple explanation for the AWK command.
And also help me to explain the code i have made. I have made some general comments about it myself. I was wondering if people could help me with the rest:
awk -F'' 'END {
fmt = "%-20s\t%s\t%s\n" ... (0 Replies)
Hello
I've got a script that takes 2 parameters. id and f.
id is a user id and f is a file.
I want to print this id on the first line and then the file.
how can this be done?
thanks (3 Replies)
Hello,
How can I make an alias of an AWK one liner that prints specific lines from a file like below?
# from a command like this:
awk 'NR == 100, NR == 150' file.cfg
The alias I want to make should work like this(I guess):
<alias_command> <file.cfg><start_line><end_line>
So the... (1 Reply)
Hi,
The below script is working fine
awk1.sh
=======
awk BEGIN { FS="|" } FNR==NR { f1=$2; next } $1 in f1 && $2 =="xx" && $1 == "DAILY_JOB" {print $3}
awk -f awk1.sh a.txt b.txt--Its working fine .
When passing parameters its not working .Any help it should be appereciated.
... (4 Replies)
hi all
can any one help me to understand this
bdf -t vfxs | awk '/\//{printf("%-30s%-10s%-10s%-10s%-5s%-10s\n",$1,$2,$3,$4,$5,$6)}'
i want to understand the numbers %-30S% (4 Replies)
Hello,
I have recently come across this awk program. Can some one shed some light on what is taking place.
awk '{!a++}END{for(i in a) if ( a >10 ) print a,i }' $FILE
Best Regards,
jaysunn (1 Reply)
Hi, i'm just after a simple explanation of how the following awk oneliner works.
gawk -F"," '{for(i=m;i<=n;i++)printf "%s" OFS,$i; print x}' m=1 n=70 OFS=, input.csv > output.csv
In particular i'm trying to understand how the two print statements work? How is the "x" variable being assigned... (3 Replies)
To merge mutiple *.tab files as:
file1.tab
rs1 A A
rs2 A A
rs3 C C
rs4 C Cfile2.ind
rs1 T T
rs2 T T
rs3 G G
rs4 G Gand file3.tab
rs1 B B
rs2 B B
rs3 L L
rs4 L LOutput:
file1.tab file2.tab file3.tab
AA TT BB
AA TT BB
CC GG LL
CC GG ... (4 Replies)
hi
what is the meaning of the below code, please explain in details
RewriteRule '^/(.*)$1$2/?' (1 Reply)
Discussion started by: raghur77
1 Replies
LEARN ABOUT SUSE
igawk
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)