diff options
author | Larry Wall <lwall@netlabs.com> | 1993-10-07 23:00:00 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1993-10-07 23:00:00 +0000 |
commit | 79072805bf63abe5b5978b5928ab00d360ea3e7f (patch) | |
tree | 96688fcd69f9c8d2110e93c350b4d0025eaf240d /eg | |
parent | e334a159a5616cab575044bafaf68f75b7bb3a16 (diff) | |
download | perl-79072805bf63abe5b5978b5928ab00d360ea3e7f.tar.gz |
perl 5.0 alpha 2perl-5a2
[editor's note: from history.perl.org. The sparc executables
originally included in the distribution are not in this commit.]
Diffstat (limited to 'eg')
-rw-r--r-- | eg/ADB | 2 | ||||
-rw-r--r-- | eg/changes | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | eg/down | 0 | ||||
-rw-r--r-- | eg/dus | 2 | ||||
-rw-r--r-- | eg/findcp | 2 | ||||
-rw-r--r-- | eg/findtar | 2 | ||||
-rw-r--r-- | eg/g/gcp | 2 | ||||
-rw-r--r-- | eg/g/gcp.man | 2 | ||||
-rw-r--r-- | eg/g/ged | 2 | ||||
-rw-r--r-- | eg/g/gsh | 2 | ||||
-rw-r--r-- | eg/g/gsh.man | 2 | ||||
-rw-r--r-- | eg/muck.man | 2 | ||||
-rw-r--r-- | eg/myrup | 2 | ||||
-rw-r--r-- | eg/nih | 2 | ||||
-rw-r--r-- | eg/relink | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | eg/rename | 5 | ||||
-rw-r--r-- | eg/rmfrom | 2 | ||||
-rw-r--r-- | eg/scan/scan_df | 2 | ||||
-rw-r--r-- | eg/scan/scan_last | 2 | ||||
-rw-r--r-- | eg/scan/scan_messages | 2 | ||||
-rw-r--r-- | eg/scan/scan_passwd | 2 | ||||
-rw-r--r-- | eg/scan/scan_ps | 2 | ||||
-rw-r--r-- | eg/scan/scan_sudo | 2 | ||||
-rw-r--r-- | eg/scan/scan_suid | 2 | ||||
-rw-r--r-- | eg/scan/scanner | 2 | ||||
-rw-r--r-- | eg/shmkill | 2 | ||||
-rwxr-xr-x | eg/unuc | 186 | ||||
-rw-r--r-- | eg/unuc.pats | 138 | ||||
-rw-r--r-- | eg/van/empty | 2 | ||||
-rw-r--r-- | eg/van/unvanish | 2 | ||||
-rw-r--r-- | eg/van/vanexp | 2 | ||||
-rw-r--r-- | eg/van/vanish | 2 |
32 files changed, 359 insertions, 29 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: ADB,v 4.0 91/03/20 01:08:34 lwall Locked $ +# $RCSfile: ADB,v $$Revision: 4.1 $$Date: 92/08/07 17:20:06 $ # This script is only useful when used in your crash directory. diff --git a/eg/changes b/eg/changes index 3b712e81e7..901e1eda9e 100644 --- a/eg/changes +++ b/eg/changes @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: changes,v 4.0 91/03/20 01:08:56 lwall Locked $ +# $RCSfile: changes,v $$Revision: 4.1 $$Date: 92/08/07 17:20:08 $ ($dir, $days) = @ARGV; $dir = '/' if $dir eq ''; @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: dus,v 4.0 91/03/20 01:09:20 lwall Locked $ +# $RCSfile: dus,v $$Revision: 4.1 $$Date: 92/08/07 17:20:11 $ # This script does a du -s on any directories in the current directory that # are not mount points for another filesystem. @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: findcp,v 4.0 91/03/20 01:09:37 lwall Locked $ +# $RCSfile: findcp,v $$Revision: 4.1 $$Date: 92/08/07 17:20:12 $ # This is a wrapper around the find command that pretends find has a switch # of the form -cp host:destination. It presumes your find implements -ls. diff --git a/eg/findtar b/eg/findtar index d7c85d4255..6462f66b4f 100644 --- a/eg/findtar +++ b/eg/findtar @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: findtar,v 4.0 91/03/20 01:09:48 lwall Locked $ +# $RCSfile: findtar,v $$Revision: 4.1 $$Date: 92/08/07 17:20:13 $ # findtar takes find-style arguments and spits out a tarfile on stdout. # It won't work unless your find supports -ls and your tar the I flag. @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: gcp,v 4.0 91/03/20 01:10:05 lwall Locked $ +# $RCSfile: gcp,v $$Revision: 4.1 $$Date: 92/08/07 17:20:15 $ # Here is a script to do global rcps. See man page. diff --git a/eg/g/gcp.man b/eg/g/gcp.man index 8f4fa44b19..1198554858 100644 --- a/eg/g/gcp.man +++ b/eg/g/gcp.man @@ -1,4 +1,4 @@ -.\" $Header: gcp.man,v 4.0 91/03/20 01:10:13 lwall Locked $ +.\" $RCSfile: gcp.man,v $$Revision: 4.1 $$Date: 92/08/07 17:20:17 $ .TH GCP 1C "13 May 1988" .SH NAME gcp \- global file copy @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: ged,v 4.0 91/03/20 01:10:22 lwall Locked $ +# $RCSfile: ged,v $$Revision: 4.1 $$Date: 92/08/07 17:20:18 $ # Does inplace edits on a set of files on a set of machines. # @@ -1,6 +1,6 @@ #! /usr/bin/perl -# $Header: gsh,v 4.0 91/03/20 01:10:40 lwall Locked $ +# $RCSfile: gsh,v $$Revision: 4.1 $$Date: 92/08/07 17:20:20 $ # Do rsh globally--see man page diff --git a/eg/g/gsh.man b/eg/g/gsh.man index 845d1f51fd..2958707fb0 100644 --- a/eg/g/gsh.man +++ b/eg/g/gsh.man @@ -1,4 +1,4 @@ -.\" $Header: gsh.man,v 4.0 91/03/20 01:10:46 lwall Locked $ +.\" $RCSfile: gsh.man,v $$Revision: 4.1 $$Date: 92/08/07 17:20:22 $ .TH GSH 8 "13 May 1988" .SH NAME gsh \- global shell diff --git a/eg/muck.man b/eg/muck.man index ec9e5d88fb..02ae428f18 100644 --- a/eg/muck.man +++ b/eg/muck.man @@ -1,4 +1,4 @@ -.\" $Header: muck.man,v 4.0 91/03/20 01:11:04 lwall Locked $ +.\" $RCSfile: muck.man,v $$Revision: 4.1 $$Date: 92/08/07 17:20:23 $ .TH MUCK 1 "10 Jan 1989" .SH NAME muck \- make usage checker @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: myrup,v 4.0 91/03/20 01:11:16 lwall Locked $ +# $RCSfile: myrup,v $$Revision: 4.1 $$Date: 92/08/07 17:20:26 $ # This was a customization of ruptime requested by someone here who wanted # to be able to find the least loaded machine easily. It uses the @@ -1,7 +1,7 @@ eval "exec /usr/bin/perl -Spi.bak $0 $*" if $running_under_some_shell; -# $Header: nih,v 4.0 91/03/20 01:11:29 lwall Locked $ +# $RCSfile: nih,v $$Revision: 4.1 $$Date: 92/08/07 17:20:27 $ # This script makes #! scripts directly executable on machines that don't # support #!. It edits in place any scripts mentioned on the command line. @@ -2,9 +2,12 @@ 'di'; 'ig00'; # -# $Header: relink,v 4.0 91/03/20 01:11:40 lwall Locked $ +# $RCSfile: relink,v $$Revision: 4.1 $$Date: 92/08/07 17:20:29 $ # # $Log: relink,v $ +# Revision 4.1 92/08/07 17:20:29 lwall +# Stage 6 Snapshot +# # Revision 4.0 91/03/20 01:11:40 lwall # 4.0 baseline. # diff --git a/eg/rename b/eg/rename index 6d6188d7d0..0aedbb97ad 100644..100755 --- a/eg/rename +++ b/eg/rename @@ -2,9 +2,12 @@ 'di'; 'ig00'; # -# $Header: rename,v 4.0 91/03/20 01:11:53 lwall Locked $ +# $RCSfile: rename,v $$Revision: 4.1 $$Date: 92/08/07 17:20:30 $ # # $Log: rename,v $ +# Revision 4.1 92/08/07 17:20:30 lwall +# Stage 6 Snapshot +# # Revision 4.0 91/03/20 01:11:53 lwall # 4.0 baseline. # @@ -1,6 +1,6 @@ #!/usr/bin/perl -n -# $Header: rmfrom,v 4.0 91/03/20 01:12:02 lwall Locked $ +# $RCSfile: rmfrom,v $$Revision: 4.1 $$Date: 92/08/07 17:20:31 $ # A handy (but dangerous) script to put after a find ... -print. diff --git a/eg/scan/scan_df b/eg/scan/scan_df index ea76f8804a..c221cdc9db 100644 --- a/eg/scan/scan_df +++ b/eg/scan/scan_df @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: scan_df,v 4.0 91/03/20 01:12:28 lwall Locked $ +# $RCSfile: scan_df,v $$Revision: 4.1 $$Date: 92/08/07 17:20:33 $ # This report points out filesystems that are in danger of overflowing. diff --git a/eg/scan/scan_last b/eg/scan/scan_last index c2c1606224..4d15ca0a3f 100644 --- a/eg/scan/scan_last +++ b/eg/scan/scan_last @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: scan_last,v 4.0 91/03/20 01:12:45 lwall Locked $ +# $RCSfile: scan_last,v $$Revision: 4.1 $$Date: 92/08/07 17:20:35 $ # This reports who was logged on at weird hours diff --git a/eg/scan/scan_messages b/eg/scan/scan_messages index 5aa45ff102..6cf099717d 100644 --- a/eg/scan/scan_messages +++ b/eg/scan/scan_messages @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: scan_messages,v 4.0 91/03/20 01:13:01 lwall Locked $ +# $RCSfile: scan_messages,v $$Revision: 4.1 $$Date: 92/08/07 17:20:37 $ # This prints out extraordinary console messages. You'll need to customize. diff --git a/eg/scan/scan_passwd b/eg/scan/scan_passwd index e24e1852e4..50f6fc886a 100644 --- a/eg/scan/scan_passwd +++ b/eg/scan/scan_passwd @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: scan_passwd,v 4.0 91/03/20 01:13:18 lwall Locked $ +# $RCSfile: scan_passwd,v $$Revision: 4.1 $$Date: 92/08/07 17:20:38 $ # This scans passwd file for security holes. diff --git a/eg/scan/scan_ps b/eg/scan/scan_ps index 44fdfbbd69..18b5cb27e4 100644 --- a/eg/scan/scan_ps +++ b/eg/scan/scan_ps @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: scan_ps,v 4.0 91/03/20 01:13:29 lwall Locked $ +# $RCSfile: scan_ps,v $$Revision: 4.1 $$Date: 92/08/07 17:20:40 $ # This looks for looping processes. diff --git a/eg/scan/scan_sudo b/eg/scan/scan_sudo index c5d46466cf..5b143e941c 100644 --- a/eg/scan/scan_sudo +++ b/eg/scan/scan_sudo @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: scan_sudo,v 4.0 91/03/20 01:13:44 lwall Locked $ +# $RCSfile: scan_sudo,v $$Revision: 4.1 $$Date: 92/08/07 17:20:42 $ # Analyze the sudo log. diff --git a/eg/scan/scan_suid b/eg/scan/scan_suid index fdff2a0ebe..c10aa5864d 100644 --- a/eg/scan/scan_suid +++ b/eg/scan/scan_suid @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: scan_suid,v 4.0 91/03/20 01:14:00 lwall Locked $ +# $RCSfile: scan_suid,v $$Revision: 4.1 $$Date: 92/08/07 17:20:43 $ # Look for new setuid root files. diff --git a/eg/scan/scanner b/eg/scan/scanner index 968a36dc8d..e73cdc8815 100644 --- a/eg/scan/scanner +++ b/eg/scan/scanner @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: scanner,v 4.0 91/03/20 01:14:11 lwall Locked $ +# $RCSfile: scanner,v $$Revision: 4.1 $$Date: 92/08/07 17:20:44 $ # This runs all the scan_* routines on all the machines in /etc/ghosts. # We run this every morning at about 6 am: diff --git a/eg/shmkill b/eg/shmkill index 55893ccb83..b91ee6f2a4 100644 --- a/eg/shmkill +++ b/eg/shmkill @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: shmkill,v 4.0 91/03/20 01:14:20 lwall Locked $ +# $RCSfile: shmkill,v $$Revision: 4.1 $$Date: 92/08/07 17:20:45 $ # A script to call from crontab periodically when people are leaving shared # memory sitting around unattached. diff --git a/eg/unuc b/eg/unuc new file mode 100755 index 0000000000..ae5c65285d --- /dev/null +++ b/eg/unuc @@ -0,0 +1,186 @@ +#!/usr/bin/perl + +print STDERR "Loading proper nouns...\n"; +open(DICT,"/usr/dict/words") || die "Can't find /usr/dict/words: $!\n"; +while (<DICT>) { + if (/^[A-Z]/) { + chop; + ($lower = $_) =~ y/A-Z/a-z/; + $proper{$lower} = $_; + } +} +close DICT; +print STDERR "Loading exceptions...\n"; + +$prog = <<'EOT'; +while (<>) { + next if /[a-z]/; + y/A-Z/a-z/; + s/(\w+)/$proper{$1} ? $proper{$1} : $1/eg; + s/^(\s*)([a-z])/$1 . (($tmp = $2) =~ y:a-z:A-Z:,$tmp)/e; + s/([-.?!]["']?(\n\s*| \s*)["']?)([a-z])/$1 . (($tmp = $3) =~ y:a-z:A-Z:,$tmp)/eg; + s/\b([b-df-hj-np-tv-xz]+)\b/(($tmp = $1) =~ y:a-z:A-Z:,$tmp)/eg; + s/([a-z])'([SDT])\b/$1 . "'" . (($tmp = $2) =~ y:A-Z:a-z:,$tmp)/eg; +EOT +while (<DATA>) { + chop; + next if /^$/; + next if /^#/; + if (! /;$/) { + $foo = $_; + $foo =~ y/A-Z/a-z/; + print STDERR "Dup $_\n" if $proper{$foo}; + $foo =~ s/([^\w ])/\\$1/g; + $foo =~ s/ /(\\s+)/g; + $foo = "\\b" . $foo if $foo =~ /^\w/; # XXX till patch 9 + $foo .= "\\b" if $foo =~ /\w$/; + $i = 0; + ($bar = $_) =~ s/ /'$' . ++$i/eg; + $_ = "s/$foo/$bar/gi;"; + } + $prog .= ' ' . $_ . "\n"; +} +$prog .= "}\ncontinue {\n print;\n}\n"; + +$/ = ''; +#print $prog; +eval $prog; die $@ if $@; +__END__ +A.M. +Air Force +Air Force Base +Air Force Station +American +Apr. +Ariane +Aug. +August +Bureau of Labor Statistics +CIT +Caltech +Cape Canaveral +Challenger +China +Corporation +Crippen +Daily News in Brief +Daniel Quayle +Dec. +Discovery +Edwards +Endeavour +Feb. +Ford Aerospace +Fri. +General Dynamics +George Bush +Headline News +HOTOL +I +II +III +IV +IX +Institute of Technology +JPL +Jan. +Jul. +Jun. +Kennedy Space Center +LDEF +Long Duration Exposure Facility +Long March +Mar. +March +Martin +Martin Marietta +Mercury +Mon. +in May +s/\bmay (\d)/May $1/g; +s/\boffice of (\w)/'Office of ' . (($tmp = $1) =~ y:a-z:A-Z:,$tmp)/eg; +National Science Foundation +NASA Select +New Mexico +Nov. +OMB +Oct. +Office of Management and Budget +President +President Bush +Richard Truly +Rocketdyne +Russian +Russians +Sat. +Sep. +Soviet +Soviet Union +Soviets +Space Shuttle +Sun. +Thu. +Tue. +U.S. +Union of Soviet Socialist Republics +United States +VI +VII +VIII +Vice President +Vice President Quayle +Wed. +White Sands +Kaman Aerospace +Aerospace Daily +Aviation Week +Space Technology +Washington Post +Los Angeles Times +New York Times +Aerospace Industries Association +president of +Johnson Space Center +Space Services +Inc. +Co. +Hughes Aircraft +Company +Orbital Sciences +Swedish Space +Arnauld +Nicogosian +Magellan +Galileo +Mir +Jet Propulsion Laboratory +University +Department of Defense +Orbital Science +OMS +United Press International +United Press +UPI +Associated Press +AP +Cable News Network +Cape York +Zenit +SYNCOM +Eastern +Western +Test Range +Jcsat +Japanese Satellite Communications +Defence Ministry +Defense Ministry +Skynet +Fixed Service Structure +Launch Processing System +Asiasat +Launch Control Center +Earth +CNES +Glavkosmos +Pacific +Atlantic diff --git a/eg/unuc.pats b/eg/unuc.pats new file mode 100644 index 0000000000..6924dc6a0d --- /dev/null +++ b/eg/unuc.pats @@ -0,0 +1,138 @@ +A.M. +Air Force +Air Force Base +Air Force Station +American +Apr. +Ariane +Aug. +August +Bureau of Labor Statistics +CIT +Caltech +Cape Canaveral +Challenger +China +Corporation +Crippen +Daily News in Brief +Daniel Quayle +Dec. +Discovery +Edwards +Endeavour +Feb. +Ford Aerospace +Fri. +General Dynamics +George Bush +Headline News +HOTOL +I +II +III +IV +IX +Institute of Technology +JPL +Jan. +Jul. +Jun. +Kennedy Space Center +LDEF +Long Duration Exposure Facility +Long March +Mar. +March +Martin +Martin Marietta +Mercury +Mon. +in May +s/\bmay (\d)/May $1/g; +s/\boffice of (\w)/'Office of ' . (($tmp = $1) =~ y:a-z:A-Z:,$tmp)/eg; +National Science Foundation +NASA Select +New Mexico +Nov. +OMB +Oct. +Office of Management and Budget +President +President Bush +Richard Truly +Rocketdyne +Russian +Russians +Sat. +Sep. +Soviet +Soviet Union +Soviets +Space Shuttle +Sun. +Thu. +Tue. +U.S. +Union of Soviet Socialist Republics +United States +VI +VII +VIII +Vice President +Vice President Quayle +Wed. +White Sands +Kaman Aerospace +Aerospace Daily +Aviation Week +Space Technology +Washington Post +Los Angeles Times +New York Times +Aerospace Industries Association +president of +Johnson Space Center +Space Services +Inc. +Co. +Hughes Aircraft +Company +Orbital Sciences +Swedish Space +Arnauld +Nicogosian +Magellan +Galileo +Mir +Jet Propulsion Laboratory +University +Department of Defense +Orbital Science +OMS +United Press International +United Press +UPI +Associated Press +AP +Cable News Network +Cape York +Zenit +SYNCOM +Eastern +Western +Test Range +Jcsat +Japanese Satellite Communications +Defence Ministry +Defense Ministry +Skynet +Fixed Service Structure +Launch Processing System +Asiasat +Launch Control Center +Earth +CNES +Glavkosmos +Pacific +Atlantic diff --git a/eg/van/empty b/eg/van/empty index 954dbd11b2..d699319717 100644 --- a/eg/van/empty +++ b/eg/van/empty @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: empty,v 4.0 91/03/20 01:15:25 lwall Locked $ +# $RCSfile: empty,v $$Revision: 4.1 $$Date: 92/08/07 17:20:50 $ # This script empties a trashcan. diff --git a/eg/van/unvanish b/eg/van/unvanish index 82d3291ed8..acb1603f99 100644 --- a/eg/van/unvanish +++ b/eg/van/unvanish @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: unvanish,v 4.0 91/03/20 01:15:38 lwall Locked $ +# $RCSfile: unvanish,v $$Revision: 4.1 $$Date: 92/08/07 17:20:52 $ sub it { if ($olddir ne '.') { diff --git a/eg/van/vanexp b/eg/van/vanexp index 26adae20a9..415b73b16d 100644 --- a/eg/van/vanexp +++ b/eg/van/vanexp @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: vanexp,v 4.0 91/03/20 01:15:54 lwall Locked $ +# $RCSfile: vanexp,v $$Revision: 4.1 $$Date: 92/08/07 17:20:53 $ # This is for running from a find at night to expire old .deleteds diff --git a/eg/van/vanish b/eg/van/vanish index 9cd809ab10..09b9679a64 100644 --- a/eg/van/vanish +++ b/eg/van/vanish @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: vanish,v 4.0 91/03/20 01:16:05 lwall Locked $ +# $RCSfile: vanish,v $$Revision: 4.1 $$Date: 92/08/07 17:20:54 $ sub it { if ($olddir ne '.') { |