Search Results

Search: Posts Made By: xyzstar
2,201
Posted By xyzstar
i changed the code
awk -v X="$Y" -v M="$N" -v str="$K"
{
if [str='1'] then {
if ($0 ~ X ) { sub (xyz.*/,"xyz",$0) }
if ($0 ~ M/ ) { sub (xyz.*/,"xyz",$0) }
}
print 0
}, filename > temp


i am not sure how to...
2,201
Posted By xyzstar
here it goes
awk -v X={$Y} -v M={$N} -v str={$K}
{
if [str='1'] then {
if ($0 ~ /X/ ) { sub (xyz.*/,"xyz",$0) }
if ($0 ~ /M/ ) { sub (xyz.*/,"xyz",$0) }
}
print 0
}, filename > temp

this is the full...
2,201
Posted By xyzstar
cool seem to work
we need to remove extra // when using in awk for variable.

Although second approach still dont work

i am using multiple if

---------- Post updated at 10:35 AM ---------- Previous update was...
2,201
Posted By xyzstar
not working
doesn't seem to work .

the second option through errors

any suggestion plz
2,201
Posted By xyzstar
awk replacement problem
hi

i am using awk for first time so i am having issue

is it the correct way of using

Y here is variable which i fetch using grep from file

awk -v X={$Y}
{
if ($0 ~ /X/ ) { sub...
Showing results 1 to 5 of 5

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