Search Results

Search: Posts Made By: lewk
2,271
Posted By Don Cragun
Move the print statement as shown below. Current...
Move the print statement as shown below. Current script:
awk -F, '
FNR == NR {
ip[$1 "."]
next
}
{ for(i in ip)
if(index($2, i) == 1) {
print
next
}
}' file0[12].out
Script...
2,271
Posted By Don Cragun
A fairly simple way to do this with awk is: awk...
A fairly simple way to do this with awk is:
awk -F, ' # Invoke awk to process your files with the field
# separator set to ",".
FNR == NR { # For lines in the 1st input file (the # of...
18,317
Posted By Scrutinizer
Indeed :) you are correct. I did not want to...
Indeed :) you are correct. I did not want to overcomplicate things, but file names with spaces occur quite frequently so I felt that was the most important note to make...

To complete the quest...
18,317
Posted By alister
And that's an understatement. The approach also...
And that's an understatement. The approach also won't work if a filename contains a tab, single quote, double quote, or backslash. There is also the remote possibility that a file name of a single...
Showing results 1 to 4 of 4

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