From: "Tony Lawrence" <pcu...@gmail.com> Subject: Re: How can I delay after sending each character to a device? Date: 26 Dec 2006 07:36:40 -0800 Message-ID: <1167147400.479318.115920@73g2000cwn.googlegroups.com> References: <1167143809.705459.308340@79g2000cws.googlegroups.com> Tony Lawrence wrote: > mail...@cpacker.org wrote: > > Can this be done with a shell script: > > Send a file to /dev/lp0 one character > > at a time so that I can slow down the > > transfer rate slightly by executing > > no-ops between the output of each > > character. > > > > Motivation: an old Okidata dot-matrix > > printer that I want to use to print > > some long program listings on fan-fold > > paper. It prints garbage that some > > experimentation revealed to be the > > result of it dropping approximately every > > other character. > > Well, sure, of course it can be done, though much easier in a language > like Perl than in the shell and arguably even easier in C. > > But this sounds more like broken hardware. For example, if you do > > echo -n h > /dev/lp0;sleep 60; echo -n i > /dev/lp0;sleep 1; echo -n ! > > /dev/lp0 > > does it print "hi!" or "h!" ? I forgot to add this: http://zwitterion.org/software/slow-filter/ would give you a tool to slow down output.. -- Tony Lawrence Unix/Linux/Mac OS X Resources http://aplawrence.com
Add your comments