Re: bash question.
On Wed, 6 Feb 2002 20:30:47 +0200 (EET) "Petrov M.I." <petrov@mao.kiev.ua> wrote:
> Hi All.
> I write small script:
> #!/bin/bash
> echo -e "...PJL commands..." | cat > /dev/lp0
Try adding a newline:
echo -e "...PJL commands...\n" | cat > /dev/lp0
> cat /dev/lp0
???
> When I try it run I get nothing.
> When I run this script two time (one after the other)
> I get informations.
> I need write to & read from /dev/lp0 in one & the same
> script. How do this do? Any help appreciated.
How do you _read_ from the printer, which is an output device?
Are you trying to get status info back from the printer? You'd
need something more low-level than bash for that.
--
+------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron.l.johnson@cox.net |
| Jefferson, LA USA http://ronandheather.dhs.org:81 |
| |
! Great Inventors of our time: |
! Al Gore -> Internet |
! Sun Microsystems -> Clusters |
+------------------------------------------------------------+
Reply to: