Search Results

Search: Posts Made By: summer_cherry
5,292
Posted By summer_cherry
use var for awk
For above case, we can use a variable and pass it to awk.

nawk -v a=10 'BEGIN{print a}'
5,292
Posted By summer_cherry
hi
Hi,

I think this one can help you.
input:
a:
this,is
this,is
this,is
b:
first
second
third
code:
awk 'BEGIN{FS=","}
{
if (NF==1)
hou[NR]=$0
if (NF>1)
qian[NR-3]=$0
}
Showing results 1 to 2 of 2

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