Pagina 1 di 1

[Risolto](bash) ragguppare testo

Inviato: sabato 22 aprile 2017, 22:51
da zerocoll
ciau belli ho un file di testo composto da link fatto cosi

Codice: Seleziona tutto

http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/

io vorrei dividerlo a gruppi di 6 cioe ogni 6 link mettere una linea vuota

Codice: Seleziona tutto

http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/

http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
http://forum.ubuntu-it.org/
esiste un comando comodo da fare pensavo a sed ma non saprei come fare

saluti :D

Re: (bash) ragguppare testo

Inviato: sabato 22 aprile 2017, 23:16
da UbuNuovo

Codice: Seleziona tutto

sed -i '0~6 a\\' file.txt

Re: (bash) ragguppare testo

Inviato: domenica 23 aprile 2017, 1:08
da zerocoll
grande funziona
anche se nn ho ben capito che hai fatto :D

grazie