File: revlines.sed

package info (click to toggle)
sedsed 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,008 kB
  • sloc: sed: 37,239; ansic: 2,395; python: 815; sh: 624; makefile: 95
file content (10 lines) | stat: -rw-r--r-- 248 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#n
#! /bin/sed -nf

# These three reverse the lines in a file by moving the line to
# the *beginning* of hold space.  Replace these three with a `p'
# (or remove them and remove the -n flag above) to reverse
# the chars on a single line
1! G
h
$ p