Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fed up with CUPS configurations? HOWTO print everything (ps)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pau
Apprentice
Apprentice


Joined: 26 Dec 2004
Posts: 159
Location: /home/pau/

PostPosted: Tue Aug 01, 2006 9:21 pm    Post subject: Fed up with CUPS configurations? HOWTO print everything (ps) Reply with quote

I was a bit fed up of trying to configure the printers everytime I am working in a different institute (which happens often), so that I wrote this small script to print a ps file if you have the server name... enjoy (you could also add more options, like convert to ps if it's not a ps but I let you that). You can change the shell you're using... mine is zsh, and don't forget to chmod u+x print2hostname.sh

Code:
#!/usr/bin/env zsh

# print2hostname.sh
# Copyright Pau Amaro-Seoane, license GPL
# http://www.fsf.org/licensing/licenses/gpl.txt


tty -s && stdin_is_human=1
tty -s <&1 && stdout_is_human=1

clear ;

print "The document must be a ps";

print "";

echo -n "What's the name of the server (blabla.institute.bloblo.edu)?  ";

read Servidor ;

print "";

echo -n "What's the ps file you want to print (give me the path too if it's not here)?  ";

read Fitxer ;

cat ./$Fitxer | telnet $Servidor 9100 ;

clear ;

print "The file $Fitxer is being printed on $Servidor"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum