View previous topic :: View next topic |
Author |
Message |
-RdX- n00b
Joined: 23 Dec 2003 Posts: 60 Location: Sevilla (spain)
|
Posted: Tue Jul 06, 2004 8:08 pm Post subject: [ASCII] convertir de Unix a dos |
|
|
Hola,
necesito cambiar el formato de un fichero de texto creado en unix a formato dos, me refiero a los retornos de carro principalmente y a ser posible con una linea de comando para insertarlo en un script. ¿Sabeis de algun programilla?
Saludos |
|
Back to top |
|
|
TieferFeld Guru
Joined: 01 May 2004 Posts: 550 Location: irgendwie, irgendwo, irgendwann
|
Posted: Tue Jul 06, 2004 8:41 pm Post subject: |
|
|
Las mtools (sys-fs/mtools) tienen esa opción (creo que con mcopy -t, pero se mira en la ayuda y listo). Están en el portage |
|
Back to top |
|
|
Stolz Moderator
Joined: 19 Oct 2003 Posts: 3028 Location: Hong Kong
|
Posted: Tue Jul 06, 2004 10:08 pm Post subject: |
|
|
Prueba con esto:
De DOS a UNIX Code: | perl -p -i~ -e 's/\r//g' nombre_del_archivo |
De UNIX a DOS Code: | perl -p -i~ -e 's/\n/\r\n/g' nombre_del_archivo |
Saludozzzzzzz |
|
Back to top |
|
|
trompa Guru
Joined: 15 Sep 2003 Posts: 368 Location: Vigo (Spain)
|
Posted: Wed Jul 07, 2004 12:21 am Post subject: |
|
|
* app-text/dos2unix
Latest version available: 3.1
Latest version installed: [ Not Installed ]
Size of downloaded files: 13 kB
Homepage:
Description: Dos2unix converts DOS or MAC text files to UNIX format
* app-text/unix2dos
Latest version available: 2.2
Latest version installed: [ Not Installed ]
Size of downloaded files: 5 kB
Homepage:
Description: UNIX to DOS text file format converter
Lo más cómodo _________________ JabberID: trompa@jabber.com |
|
Back to top |
|
|
-RdX- n00b
Joined: 23 Dec 2003 Posts: 60 Location: Sevilla (spain)
|
Posted: Wed Jul 07, 2004 10:37 am Post subject: |
|
|
sois unos soles xD
usare unix2dos, aunque la respuesta de stolz me ha gustao, madre mia que comando.
salud! |
|
Back to top |
|
|
|