BSD 4_1_snap development
[unix-history] / usr / lib / learn / editor / L6.2a
#print
How does the editor choose a line to print?
It always remembers a 'current line', which
is the last line of the file originally,
but you can choose any line you want. The command
3p
prints the third line of the file, for example.
And
1p
prints the first line. Note that is the digit one
there, not the letter l, no matter how much alike they
look. I'll put you into the editor with the
file listed below: print the first line,
then type 'w', 'q' and 'ready' as usual.
#create Ref
george washington
91
#create file
george washington
john adams
thomas jefferson
james madison
james monroe
john quincy adams
#print file
#copyout
#pipe
ed file
#user
#unpipe
#uncopyout
tail -2 .ocopy >X2
#cmp Ref X2
#log
#next
6.2b 5