[PLUG] Simple Linux BASH thing I suspect

D. Cooper Stevenson cooper at cooper.stevenson.name
Tue Sep 21 22:23:15 UTC 2010


On 09/22/10 14:58, Kirk Goins wrote:
[snip

> > I need to do this same thing on this thin client.  Assuming I can get to bash, how would I do this simple script?
>   
[snip]


Hi Kirk,

Get a load of this (link this script in your /etc/init.d/ directory):

------------------------------------ Begin Script
---------------------------------------
#!/bin/bash

#initialization variables
myprinter=/dev/lp0
logo_file=/usr/local/doc/my_logo.ext

#print logo to printer
lpr -P$myprinter $logo_file
-------------------------------------- End Script
----------------------------------------


You can do fancy things like dynamically assign the printer name by
scanning the 'dmesg' startup log. If you had different models of thin
clients, for example, this might come in handy.

I've written this script "fuzzily," i.e. the precise commands need to be
checked and tested. This should give you a pretty good guide though.


Very Best,


D. Cooper Stevenson
-- D. Cooper Stevenson ph: 541.971.0366 em: cooper at cooper.stevenson.name
<mailto:cooper at cooper.stevenson.name> www: http://cooper.stevenson.name




More information about the PLUG mailing list