summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/eg/g/ged
blob: 2846cba2478de52c7f15e7d0d36534061ee2c398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

# $RCSfile: ged,v $$Revision: 1.3 $$Date: 1999/04/29 22:51:20 $

# Does inplace edits on a set of files on a set of machines.
#
# Typical invokation:
#
#	ged vax+sun /etc/passwd
#	s/Freddy/Freddie/;
#	^D
#

$class = shift;
$files = join(' ',@ARGV);

die "Usage: ged class files <perlcmds\n" unless $files;

exec "gsh", $class, "-d", "perl -pi.bak - $files";

die "Couldn't execute gsh for some reason, stopped";