01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VI ( 1 )<br />

VI( 1)<br />

file to newtext<br />

:gftextfs/ fnewtextfp<br />

Change first appearance of text in each line in<br />

file to newtext and print each changed line<br />

:g/ text/sf/ newtextf c<br />

List one at a time each line with text and<br />

change as required to newtext using a<br />

y<br />

:(mj,(njgf text/ sf/ newtext<br />

Change first appearance of text in each line in<br />

file to newtext<br />

:(mj,(njgf text/ sf/ newtextf p<br />

Change first appearance of text in lines from<br />

m to n to newtext and print each changed line<br />

:(mj,(njgf text/sf/ newtextf c<br />

List one at a time each line with text from m<br />

to n and change as required to newtext using<br />

ay<br />

MANIPULATING FILES<br />

Copy From Another File<br />

:r file Copy file into buffer after current line<br />

:(njr file< CR> Copy file to buffer after nth line<br />

Copy To Another File<br />

Note: Follow entry with .<br />

:w file<br />

:w! file<br />

:w>>file<br />

:(mj,(njw file<br />

:(mj,(njw ! file<br />

:(mj,(njw > >file<br />

Edit Current File<br />

:w<br />

:w file<br />

"e!<br />

:f<br />

AG<br />

:ta. tag<br />

A]<br />

Edit Other Files<br />

:e file<br />

Write the current file to file<br />

Overwrite existing file with file<br />

Add current file to end of file<br />

Write lines m through n to file<br />

Overwrite existing file with file containing<br />

lines m through n<br />

Add lines m through n to end of file<br />

Write changes to current file<br />

Write file to current unnamed file<br />

Reedit current file, discarding changes since<br />

last write<br />

Show current file and line<br />

Synonym for :f<br />

To tag file entry tag<br />

:ta., following word is tag<br />

From Current File<br />

Edit file when write has occurred in current<br />

file, return to shell after edit, changes not lost<br />

in current file<br />

- 6 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!