[opensuse-programming] 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. - -------------------------------Start-Program------------------------------- 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 - -------------------------------End-Program--------------------------------- 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 <gerberb@zenez.com> 801 849-0213 ZENEZ 1042 East Fort Union #135, Midvale Utah 84047 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAksKG1MACgkQVtBjDid73eY3YwCdGm1jchKdhRKlmY2pG/GQEY/Y PpMAn0CMSqr0J6ctq/TI1hIyeunM8TcO =IlEJ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
On Sun, Nov 22, 2009 at 10:19:10PM -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.
-------------------------------Start-Program------------------------------- 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 -------------------------------End-Program---------------------------------
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?
It seems like a typo of: trap '' 20 However, it's a curious thing; what happens if you just remove the trap call altogether? Petr "Pasky" Baudis -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 23 Nov 2009, Petr Baudis wrote:
On Sun, Nov 22, 2009 at 10:19:10PM -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.
-------------------------------Start-Program------------------------------- 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 -------------------------------End-Program---------------------------------
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?
It seems like a typo of:
trap '' 20
However, it's a curious thing; what happens if you just remove the trap call altogether?
It works. Also adding the space between ''20 solved the problem. Thanks, - -- Boyd Gerber <gerberb@zenez.com> 801 849-0213 ZENEZ 1042 East Fort Union #135, Midvale Utah 84047 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAksUPkMACgkQVtBjDid73ebIKwCfR6gAOpFO0zjROwCBnPowcCbZ 4AAAn2Q2GuXQUh6NsAf3x1lBTUSCULhm =oEe+ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (2)
-
Boyd Lynn Gerber
-
Petr Baudis