EDITOR VI: EXIT E WRITE

0
(0)

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)

https://www.officineinformaticheroma.it/wp-content/uploads/2019/01/EXIT-E-WRITE.mp4
/ 5
Grazie per aver votato!
Vuoi abilitare le notifiche?
Desiderate avere la possibilita’ di ricevere delle notifiche? Se si avrete la possibilita’ di essere sempre aggiornati con le nostre ultime proposte o notizie . Consigliamo l’adesione Grazie !
Attiva

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

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

Vai alla barra degli strumenti