[opensuse] bash programming problem with usage of trap from 10.1 to 11.2.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In SUSE Linux Professioan 10.1 I used this script to get the red hat
program to run on openSUSE 10.1.
COMPANY=WHITE;export COMPANY
dd_report=">/usr/bin/lpr -Plaser";export dd_report
dd_tray3=">/usr/bin/lpr -Plaser_tray3";export dd_tray3
dd_tom=">/usr/bin/lpr -Plexmark";export dd_tom
dd_local=">./local";export dd_local
dd_samsung=">/usr/bin/lpr -PML-1750";export dd_samsung
dd_cathy="/home/cathy/REPORT";export dd_cathy
dd_barcode=">/usr/bin/lpr -Pbarcode";export dd_barcode
trap ' '20
TERM=ansi; export TERM
Nown on openSUSE 11.2 I get the message
trap: usage: trap [-lp] [[arg] signal_spec ...]
any ideas on how the trap command on linux has changed that I get this
error instead of the program running. removeing allow the program to run
but then they are unable to print local or on the samba printers.
Any Ideas on how to fix this?
Thanks in adavance.
- --
Boyd Gerber
On Sun, Nov 22, 2009 at 11:02:23PM -0700, Boyd Lynn Gerber wrote:
In SUSE Linux Professioan 10.1 I used this script to get the red hat program to run on openSUSE 10.1.
COMPANY=WHITE;export COMPANY dd_report=">/usr/bin/lpr -Plaser";export dd_report dd_tray3=">/usr/bin/lpr -Plaser_tray3";export dd_tray3 dd_tom=">/usr/bin/lpr -Plexmark";export dd_tom dd_local=">./local";export dd_local dd_samsung=">/usr/bin/lpr -PML-1750";export dd_samsung dd_cathy="/home/cathy/REPORT";export dd_cathy dd_barcode=">/usr/bin/lpr -Pbarcode";export dd_barcode trap ' '20
^ here a space is missed ... beside this signal 20 is not always SIGTSTP. Maybe the old bash has accepted this problemantic line the new bash 4.0 does not. Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
In SUSE Linux Professioan 10.1 I used this script to get the red hat program to run on openSUSE 10.1.
Are you running the script with bash or sh, or.... Does the script start with: #!/bin/bash
COMPANY=WHITE;export COMPANY dd_report=">/usr/bin/lpr -Plaser";export dd_report dd_tray3=">/usr/bin/lpr -Plaser_tray3";export dd_tray3 dd_tom=">/usr/bin/lpr -Plexmark";export dd_tom dd_local=">./local";export dd_local dd_samsung=">/usr/bin/lpr -PML-1750";export dd_samsung dd_cathy="/home/cathy/REPORT";export dd_cathy dd_barcode=">/usr/bin/lpr -Pbarcode";export dd_barcode trap ' '20 TERM=ansi; export TERM Nown on openSUSE 11.2 I get the message trap: usage: trap [-lp] [[arg] signal_spec ...]
awilliam@linux-m3mt:~> trap ' '20 awilliam@linux-m3mt:~> I. Completes without error for me.
any ideas on how the trap command on linux has changed that I get this error instead of the program running. removeing allow the program to run but then they are unable to print local or on the samba printers. Any Ideas on how to fix this?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Adam Tauno Williams
-
Boyd Lynn Gerber
-
Dr. Werner Fink