freebsd-dev/contrib/perl5/eg/g/ged

22 lines
427 B
Perl

#!/usr/bin/perl
# $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.
#
# 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";