kamsabeti
IS-IT--Management
- Feb 26, 2008
- 21
How can I use the IF statment for the this code:
npt = substr($0,24,12)
IF npt <> "" THEN DO THIS ELSE npt = "0"
{ # Insert "-" after each group of 5 chars.
gsub( /...../, "&-", npt )
# Remove any trailing "-".
sub( /- *$/, "", npt )
}
npt = substr($0,24,12)
IF npt <> "" THEN DO THIS ELSE npt = "0"
{ # Insert "-" after each group of 5 chars.
gsub( /...../, "&-", npt )
# Remove any trailing "-".
sub( /- *$/, "", npt )
}