summaryrefslogtreecommitdiff
path: root/eg/g/ged
blob: ef1867a20d9eb45cc9d521a3ee0cfc68b6ce0ef0 (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

# $Header: ged,v 3.0 89/10/18 15:14:22 lwall Locked $

# 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";