File: bomstrip.sed

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 (20 lines) | stat: -rwxr-xr-x 673 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# this only works with some seds.
# lines without newline should get a newline after outputting.
# (strange, but that's how sed is supposed to work).
# actually, it seems sed input "should" always have a newline at
# the end of a file.

# it is know to work with:
# - sed on openbsd 3.7
# - sed on debian (probably gnu sed)

# it is know to not work with:
# - sun os (ignores "trailing text without newline" all together)
# - mac os and plan 9 (their sed print newlines after every "line"
#   of input, even when it does not have a newline).  since mac os
#   sed seems to come from freebsd, it is expected that freebsd sed
#   also does not work.

# too bad...

1s/^//