Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
freebsd problems with carriage return
- X-seq: zsh-users 13962
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: freebsd problems with carriage return
- Date: Tue, 24 Mar 2009 23:14:09 +1300 (NZDT)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
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