View previous topic :: View next topic |
Author |
Message |
-RdX- n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
TieferFeld Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/107352959641039251c18c4.jpg)
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 ![Very Happy :-D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Stolz Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
![](images/avatars/526465974367e35259deb.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
trompa Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2107528720405ef338a51f5.gif)
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 ![Wink ;)](images/smiles/icon_wink.gif) _________________ JabberID: trompa@jabber.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
-RdX- n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
|