Alain EMPAIN a écrit :
tr est fait pour cela  ( == TRansliteration):

tr 'liste-de-cibles' 'liste-de-substitution' < input > output
tr 'a-z' 'A-Z' < file > outfile : met tout en majuscules...

pour cibler des 'non-printables' tu peux par ex utiliser la notation octale, ex: \015
  (octal pour <Carriage Return> =13 en decimal)

tr '\015\013' 'CN' < file > outfile


Salut Alain,

Merci pour ta réponse. C'est vrai que je n'avais pas pensé que tr pouvais aussi faire ça. Je l'utilisais uniquement sur du texte.

Bon week-end.

--
Bruno Berteau
http://b.berteau.free.fr

_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux
Archives: http://www.mail-archive.com/linux@lists.unixtech.be
IRC: chat.unixtech.be:6667 - #unixtech
NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech

Répondre à