File: bomstrip.awk

package info (click to toggle)
bomstrip 9-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 252 kB
  • sloc: pascal: 41; ansic: 34; cpp: 34; java: 33; python: 31; sh: 24; makefile: 20; perl: 7; php: 6; ruby: 6; haskell: 6; awk: 2; sed: 1
file content (6 lines) | stat: -rwxr-xr-x 229 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
#!/usr/bin/awk -f
# by Peter Pentchev, 2008, public domain.
# does not work on the one true awk, does work on the gnu clone.  but still then fails if file does not end in newline.

NR == 1 && /^/ { sub("^...", "") }
{ print }