[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Conversion fichiers textes DOS-linux
> > ou bien avec recode:
> > cat linux.cc | recode latin1:ibmpc > windoze.cc
> Pas pour les fins de ligne. Il faut encore piper sur awk ou tr suivant le
> sens de conversion, pour ajouter ou enlever ces \r
ah non, je suis formel:
unix -> winDOwS
pab:~/tmp> printf "a\n\b\n" | od -x
0000000 0a61 0a08
0000004
pab:~/tmp> printf "a\n\b\n" | recode latin1:ibmpc | od -x
0000000 0d61 080a 0a0d
0000006
et dans l'autre sens (windoze -> unix):
pab:~/tmp> printf "a\r\n\b\r\n" | od -x
0000000 0d61 080a 0a0d
0000006
pab:~/tmp> printf "a\r\n\b\r\n" | recode ibmpc:latin1 | od -x
0000000 0a61 0a08
0000004
;)
-o) Pascal Bleser | UNIX *is* user friendly.
/\\ C++/UNIX Development | It's just selective about
_\_v ATOS Payment Systems | who its friends are...
pbleser@atos-group.com---------------------------------
---------
This message was sent by Majordomo 1.94.3. Please report problems to
manu@rtfm.be. If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.