Re: any dos2unix on Debian?



On 2006-07-18, zdk wrote:
Linux does not build with 'dos2unix' command?

How can I use this command? any .deb package or sourcecode to compile?

It doesn't need compiling. It's a simple script.

CR=`printf "\r"`
sed "s/$CR$//" "$file" > tempfile && mv "$tempfile" "$file"

--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
.



Relevant Pages

  • Re: question about compiling Expect script with freewrap: invalid command spawn
    ... > I want to compile my scripts for distribution. ... and then compiled one of my little script. ... does freewrap only support TCL ... when I run the file with error parameters, ...
    (comp.lang.tcl)
  • Re: long double in C89?
    ... >> compile time for conforming to any standard (no equivalent of ... Oh, I do (I use GNU autoconf which generates a 'configure' script, ... environment (or at least a Bourne shell equivalent and several standard ...
    (comp.lang.c)
  • Creating the RT git tree
    ... rt-master and preempt-rt branches. ... This script will update the linus branch if necessary (but it will also ... to be able to compile and boot too. ... may not include all changed files if the full convert-locks is run again. ...
    (Linux-Kernel)
  • Re: Run pyc file without specifying python path ?
    ... Run pyc file without specifying python path? ... cleaver user to change the innards of the script. ... What i usually do to accomplish this is compile the script to a .pyc just ...
    (comp.lang.python)
  • Re: compiling dcraw, a raw file to ppm convertor
    ... I'm using dcraw -4 to convert to a liniar ppm image now then converting it ... I want my script to produce file names ... GNU Humour 'Technical Thug' ... > Compile your own libjpeg and compile the app against that instead of ...
    (comp.sys.sgi.admin)