[Gambas-user] One line printing to a /dev/lp0 printer from local network
Doriano Blengino
doriano.blengino at ...1909...
Wed Mar 17 20:09:29 CET 2010
Vassilis K ha scritto:
> Thank you Alessandro very elegant solution. I'll give it a try!
>
> Doriano, I don't understand how could netcat work here.
>
>
Open a terminal and type:
nc -p27 -l |while read; do echo "send this to /dev/lp0: $REPLY"; done
Then open another terminal and type:
echo "PRINT THIS" |nc -w1 localhost 27
...I leave the rest to your imagination. If you think that a gambas
program can do this so easily, hat off to you!
Read the documentation about netcat - I bet you can not even imagine
what it can do... :-)
Regards,
Doriano
More information about the User
mailing list