[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: awk problem



It works for me although I did place your script into a file and
ran it as:

awk -f neals-script.awk /etc/services

{
if (index($0,"@") == 0 && index($0,"--none---") == 0) {
  if(substr($0,1,1) == "#") {
    print $0;	
  } else {					
    TMP = $1"\t\t"$2"\t\t#";		
    for (i = 3; i <= NF; i++) 
      TMP = $TMP $i;
    print $TMP;
  }					     
}
}
}

hth, Elizabeth



Reply to: