Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!uw-beaver!mit-eddie!killer!ernest!friday!fritz From: fritz@friday.UUCP (Fritz Whittington) Newsgroups: comp.sys.ibm.pc Subject: Re: Text file conversion between UNIX and MSDOS Message-ID: <678@friday.UUCP> Date: 24 Feb 89 19:54:37 GMT References: <89Feb9.123853est.2662@godzilla.eecg.toronto.edu> <368@dvnspc1.Dev.Unisys.COM> <273@vlsi.ll.mit.edu> Reply-To: fritz@friday.UUCP (Fritz Whittington) Distribution: na Organization: Texas Instruments, Dallas, Texas Lines: 23 In article <273@vlsi.ll.mit.edu> malpass@ll-vlsi.arpa.UUCP (Don Malpass) writes: >It discards any in the called file, parks the stripped copy in >/tmp, and renames it back to the original file. If you need wildcard . . . ># strip_cr: discards leaving only . >echo 'NOT a pipe. Renames output back to input.' >tr -d '\015' < "$1" >! /usr/tmp/dm.temp >mv /usr/tmp/dm.temp "$1" >Don Malpass [malpass@LL-vlsi.arpa], [malpass@gandalf.ll.mit.edu] A useful addition is: tr -d '\032\015' < "$1" >! /usr/tmp/dm.temp to also delete those annoying 's that often are at the end of files. I also suggest tr -d '\032\015' < "$1" >! /usr/tmp/dm.temp$$ mv /usr/tmp/dm.temp$$ "$1" to generate temp names unique to your PID, and keep two users from clobbering each other's files. ---- Fritz Whittington Texas Instruments, Incorporated I don't even claim these opinions myself! MS 3105 UUCP: killer!ernest!friday!fritz 8505 Forest Lane AT&T: (214)480-6302 Dallas, Texas 75243