Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

freebsd problems with carriage return



on linux this works as expected:

     rsync --progress /from /to | while read -d "`print '\r'`" n
     do
         print "  foo: $n"
     done

as rsync uses a carriage return to update the progress of the file 
transfer, the "read" builtin uses '\r' as a delimiter, and prints the 
output as expected, one line at a time.

on freebsd it doesn't work at all. i suspect the bug may be in bsd's 
libraries, because a similar thing happens on linux and fails to happen on 
freebsd with:
     rsync --progress /from /to | tr '\r' '\n'

of course linux is using gnu-tr and freebsd is using bsd-tr.

can anyone help identify the source of the problem, and/or a workaround?

thanks...!


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"War will cease when men refuse to fight."
 		-- F. Hansen



Messages sorted by: Reverse Date, Date, Thread, Author