#!/bin/sh # # Shell script to print an address on a 110x220 mm envelope, using a # HP Laserjet 5L and Ghostscript. # # Author: R.F. Smith # Time-stamp: <2010-08-29 14:00:55 rsmith> # # To the extent possible under law, Roland Smith has waived all copyright and # related or neighboring rights to envelope. This work is published from the # Netherlands. See http://creativecommons.org/publicdomain/zero/1.0/ # Change these to reflect your address. MYNAME="R.F. Smith" MYADRES="Dr. Hermansweg 36" MYTOWN="5624 HR EINDHOVEN" NAME="" ADDR1="" ADDR2="" ADDR3="" ADDR4="" DATE=`date` if [ ! $1 ]; then echo "Print an address on a 110 x 220 mm envelope." echo "Usage: envelop filename[.eps]"; echo ""; exit 1; fi # Strip the extension from the filename, and replace it with .ps FNAME=`echo $1 |sed -e "s/\..*//"` FNAME=$FNAME.ps # Give on-line help. echo "You have got 5 lines to give the address." echo "Output will be saved in the file $FNAME." echo "Print this file on a Laserjet 5L using Ghostscript." echo "Put a 110x220mm in the envelope input tray, with the" echo "front facing toward you, and the flap on the left backside." echo "" # Read the adress data. echo -n "1: " read NAME echo -n "2: " read ADDR1 echo -n "3: " read ADDR2 echo -n "4: " read ADDR3 echo -n "5: " read ADDR4 # Create the encapsulated postscript file cat >$FNAME <