[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Pitite question cool ..
On Tue, Feb 08, 2000 at 01:44:23PM +0100, Gobin Jean-François wrote:
> J'ai écrit un script en PERL sur mon PC au boulot en utilisant windows 95.
> Je veux l'exectuer sur ma machine, il me dit qu'il trouve un caractere
> invalide (\015) ... Je comprends a quoi c'est du, mais je fais comment pour
> les supprimer ? Sans devoir reecrire tout le script ?
C'est l'éternel problème CRLF (DOS/windoze) et LF (unix) :)
Tu as plusieurs possibilités, mais tu dois faire modifier le script.
En voici une, si tu as installé le programme "recode":
recode ibmpc..latin1 < script-dos.pl > script-unix.pl
Sinon, ça marche aussi avec 'tr':
tr -d '\r' < script-dos.pl > script-unix.pl
voilà ;)
--
-o) / Pascal Bleser ATOS Payment Systems|
/\\ \ C++/UNIX Development Aachen, Germany|
_\_v \<guru@linuxbe.org> <pbleser@atos-group.com>|
---------------------------------------------------|
Man usually avoids attributing cleverness to :
somebody else -- unless it is an enemy. :
-- Albert Einstein :
---------------------------------------------------'
---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.
Archive of the list: http://tania.be.linux.org/