radhanarra
Programmer
Hi friends,
i have one tricky problem with Getline method.i am getting an empty value into variable when i tried to Read second file with in main File(first file)using Getline method.
can any one help me to resolve this issue.i really appricate your cooeration.
first file contains one column
1
6
8
first file contains one column
a
b
c
#!/bin/ksh
x1="a2"
awk ' BEGIN { x=0 }
{
if ($1>3)
{
if (getline var < "secondfile"
print var
}
else
{
print $1
}
}' firstfile
i have one tricky problem with Getline method.i am getting an empty value into variable when i tried to Read second file with in main File(first file)using Getline method.
can any one help me to resolve this issue.i really appricate your cooeration.
first file contains one column
1
6
8
first file contains one column
a
b
c
#!/bin/ksh
x1="a2"
awk ' BEGIN { x=0 }
{
if ($1>3)
{
if (getline var < "secondfile"
print var
}
else
{
print $1
}
}' firstfile