Search Results

Search: Posts Made By: dhiren1
8,634
Posted By dhiren1
Hello I could not get few things in END. ...
Hello
I could not get few things in END.
like : c=(c=="")?i:c FS i and b=(b=="")?i:b FS i.
I know, ternary operator, but could not get this c=(c=="") and also what is the use of FS (field...
2,016
Posted By dhiren1
$ awk -vmin=100 '($3==0) && (min>$2) {...
$ awk -vmin=100 '($3==0) && (min>$2) { min=$3;s=$1}END{ print s} ' file.txt
2,455
Posted By dhiren1
Hello Scrutinizer in following sed command ...
Hello Scrutinizer

in following sed command

Could you pls. explain what {p;q;} does.

thanks
1,629
Posted By dhiren1
Is AWK acceptable ?
Is AWK acceptable ?
14,299
Posted By dhiren1
Try This :
Try This :
2,550
Posted By dhiren1
Hi Rocking77 temp.awk is input AWK script . ...
Hi Rocking77

temp.awk is input AWK script .

for example your input file name is file.txt then you can run program as follow
2,550
Posted By dhiren1
$ cat temp.awk BEGIN{ } { if(NR>1) { ...
$ cat temp.awk
BEGIN{ }
{

if(NR>1)
{
if(NF==3 && NR==2)
{
printf("CREATE TABLE %s(%s %s",$1, $2, $3)
}

if(NF==3 && NR>2)
{
...
1,020
Posted By dhiren1
Could you pls. explain what does {p=1}p does in...
Could you pls. explain what does {p=1}p does in this code.
1,699
Posted By dhiren1
$ awk -F "|" 'NR==FNR{a[$3]=$0;next} $1 in a &&...
$ awk -F "|" 'NR==FNR{a[$3]=$0;next} $1 in a && NF==5{ print a[$1],"_",$3}' OFS="|" file1.txt file2.txt
2|_|W|_||_|A
4|_|Z|_||_|C
Showing results 1 to 9 of 9

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