[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Jan 2003 ]

Re: [edlug] dos --> nix

1. dos2unix works a treat. Thankyou.
2. it is a bash script with some basic copys, greps & seds. I haven't got to 
grips with perl yet. Too many obscurely named special variables for me to 
remember. :-)

On Thursday 16 January 2003 20:44, Kevin Campbell wrote:
> On Thu, 16 Jan 2003, Andrew Beames wrote:
> > Up to now I've been using a script to translate the files
> > 	e.g.	tr -d '\r' < $file > $file.x
> > so that 'diff' doesn't show up too many changes, but I don't know how to
> > script in the end-of-line. So I've been manually editing the files that
> > 'diff' has a problem with; adding a new line; and rerunning the script.
> There's a util called dos2unix which should handle this comprehensively.
> > Anyway, main question is how I can automate the new-line task. Any ideas?
> What are you using these files for? If it's for perl scripts or the like,
> you can usually alter the command used to run the script to have it cope
> with windows encoding.
> Changing from
> #!/opt/bin/perl
> to
> #!/opt/bin/perl --
> should do the trick iirc
> HTH,
> Kev

You can find the EdLUG mailing list FAQ list at:

This archive is kept by wibble@morpheux.org.DONTSPAMME