diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-02-28 21:55:09 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-02-28 21:55:09 +0000 |
commit | ac58e20f744208e9bff2115708a2f1c4e2e2175f (patch) | |
tree | 1610ffeb1ed9dc24b5bf864c012a6d9fe7ac6720 /eg | |
parent | afd9f252e30d37007c653bd21680f0b5f6c32608 (diff) | |
download | perl-ac58e20f744208e9bff2115708a2f1c4e2e2175f.tar.gz |
perl 3.0 patch #11 patch #9, continued
See patch #9.
Diffstat (limited to 'eg')
-rw-r--r-- | eg/g/gsh | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,6 +1,6 @@ -#!/bin/perl +#! /usr/bin/perl -# $Header: gsh,v 3.0 89/10/18 15:14:36 lwall Locked $ +# $Header: gsh,v 3.0.1.1 90/02/28 17:14:10 lwall Locked $ # Do rsh globally--see man page @@ -8,11 +8,12 @@ $SIG{'QUIT'} = 'quit'; # install signal handler for SIGQUIT sub getswitches { while ($ARGV[0] =~ /^-/) { # parse switches - $ARGV[0] =~ /^-h/ && ($showhost++,$silent++,shift,next); - $ARGV[0] =~ /^-s/ && ($silent++,shift,next); - $ARGV[0] =~ /^-d/ && ($dodist++,shift,next); - $ARGV[0] =~ /^-n/ && ($n=' -n',shift,next); - $ARGV[0] =~ /^-l/ && ($l=' -l ' . $ARGV[1],shift,shift,next); + $ARGV[0] =~ /^-h/ && ($showhost++,$silent++,shift(@ARGV),next); + $ARGV[0] =~ /^-s/ && ($silent++,shift(@ARGV),next); + $ARGV[0] =~ /^-d/ && ($dodist++,shift(@ARGV),next); + $ARGV[0] =~ /^-n/ && ($n=' -n',shift(@ARGV),next); + $ARGV[0] =~ /^-l/ && ($l=' -l ' . $ARGV[1],shift(@ARGV),shift(@ARGV), + next); last; } } |