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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to