EDITOR VI: EXIT E WRITE

()

ZZ
aggiorna sempre il file ed esce (da COMMAND MODE)
:[#,#]w[!] [filename]

WRITE: scrive senza uscire (nel file “filename”,se viene specificato, altrimenti nel file corrente); vengono utilizzati “#,#” per specificare gli indirizzi ‘from’ e ‘to’ (da/a),e “!” (bang) per forzare la scrittura (cioè per riscrivere)
Esempi:
:1,5 w abcd scrive le linee da 1 a 5 nel file abcd
:/from/,/to/ w efg scrive da ‘from’ a ‘to’ nel file efg
:/from/,+5 w hij scrive da ‘from’ a 5 linee dopo nel file hij
:x WRITE and QUIT: aggiorna, se necessario, ed esce
:wq WRITE and QUIT: aggiorna ed esce
:w !UNIX-CMD


WRITE: scrive l’output e lo passa attraverso una pipe ad un comando UNIX

Esempio:
:1,10 w !lpr manda le prime 10 linee alla stampante
:q[!]QUIT: esce senza salvare le modifiche (!’bang’ forza l’uscita)

/ 5
Grazie per aver votato!

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?