Skip to main content
added 57 characters in body
Source Link
Kajukenbo
  • 357
  • 4
  • 5

POSIX vi does this, so also ed or ex.

vi:

:g/^/m0 

ex:

ex -s infile <<EOS g/^/move0 x EOS 

ed:

ed -s infile <<EOF g/^/m0 ,p w EOF 

POSIX vi does this, so also ed or ex.

vi:

:g/^/m0 

ex:

ex -s infile <<EOS g/^/move0 x EOS 

POSIX vi does this, so also ed or ex.

vi:

:g/^/m0 

ex:

ex -s infile <<EOS g/^/move0 x EOS 

ed:

ed -s infile <<EOF g/^/m0 ,p w EOF 
added 59 characters in body
Source Link
Kajukenbo
  • 357
  • 4
  • 5

POSIX vivi does this, so also do eded or exex.

vi:

:g/^/m0 

ex:

ex -s infile <<EOS g/^/move0 x EOS  

POSIX vi does this, so also do ed or ex.

:g/^/m0 

POSIX vi does this, so also ed or ex.

vi:

:g/^/m0 

ex:

ex -s infile <<EOS g/^/move0 x EOS  
fixed formating according to convention
Source Link
Archemar
  • 32.3k
  • 18
  • 75
  • 107

POSIX vivi does this, so also eddo ed or exex.

:g/^/m0 

POSIX vi does this, so also ed or ex.

:g/^/m0 

POSIX vi does this, so also do ed or ex.

:g/^/m0 
Source Link
Kajukenbo
  • 357
  • 4
  • 5
Loading