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 <>
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, ...
  • 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 ...
  • 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 ...
  • Re: Massive Memory Structures
    ... (Solaris on sparc, Solaris on x86_64) ... script, I get an out of memory error and the script dies. ... what options do I need to compile in to make this happen. ... It will create a 5g test file, ...
  • 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. ...