Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- die "Usage: ok/err/notok" if ($#ARGV == -1);
- if ($ARGV[0] eq "ok") {
- exit 0;
- } elsif ($ARGV[0] eq "notok") {
- print "This should be in SMS (stdout)\n";
- print STDERR "This shouldn't be in SMS (stderr)\n";
- exit 66;
- } elsif ($ARGV[0] eq "err") {
- print "This is a part of error message (stdout)\n";
- print STDERR "This is another part of error message (stderr)\n";
- exit 1;
- } else {
- die "Usage: ok/err/notok";
- }
Advertisement
Add Comment
Please, Sign In to add comment