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)
  • 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, ...
    (comp.lang.perl.misc)
  • 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)