It is currently Fri, 15 Oct 2021 20:07:01 GMT



 
Author Message
 NL - CR/LF conversion

Here is a csh script that uses awk to do this..

#!/bin/csh
if ($#argv == 0) then
  echo usage -- convert  file1 file2 .... file#
  exit(1)
endif
foreach x ($argv[*])
  if (-r $x) then
    awk '{ printf("%s%c\n", $0,13) }' $x >temp.xxx
    rm $x
    mv temp.xxx $x
  else
    glob convert -- cannot read $x
  endif
end

I wrote this a couple of years ago as part of another package.. The awk line
is what you need..



 Sun, 06 Mar 1994 21:52:07 GMT   
 
   [ 1 post ] 

Similar Threads

1. Solaris 2.51 printing via NT lpdsvc, LF->CR/LF conversion

2. NT/SCO lpr problem - filters CR/NL conversions, etc

3. NFS mount with CR <-> LF conversion

4. FAT CR/LF conversion

5. NL -> CR NL through sockets

6. lpr did not convert LF->CR/LF

7. Enabliing "LF->CR/LF".

8. enabling 'LF->CR/LF'

9. How to convert LF to CR/LF ?

10. ioctl and termcap - how to disable lf - cr/lf translation


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software