6.0

50
Creating Triggers
2
exit
Edit a Script File
To edit a script file:
1. Issue the following commands:
cd /etc/lp/interfaces
vi ./myscriptfile
2. In the vi text editor, use the dG command to delete all default text inside the script file.
3. Enter the following text inside your script file:
#!/bin/sh
#
options=$5
shift 5
for FILE in $*
do
cat /etc/lp/interfaces/mytrigger $FILE | lp -d queuename
-t $FILE
done
exit 0
4. Save your script file and exit the editor (press ESCAPE, then enter :wq).
5. Set the permissions on the script file as follows:
chmod 755/etc/lp/interfaces/myscriptfile
Create the Trigger File
To create a trigger file for UNIX:
1. Issue the following commands:
cd /etc/lp/interfaces
vi ./mytrigger
2. In the vi text editor, use the dG command to delete all default text inside the script file.