From f0cb40d9e4b8d3285ac7125fb40433d65fae172e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 8 Jul 2020 16:43:14 +0200 Subject: Directory tree rework --- src/gitjoe/rmuser.pl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 src/gitjoe/rmuser.pl (limited to 'src/gitjoe/rmuser.pl') diff --git a/src/gitjoe/rmuser.pl b/src/gitjoe/rmuser.pl new file mode 100755 index 0000000..944745f --- /dev/null +++ b/src/gitjoe/rmuser.pl @@ -0,0 +1,31 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; +use Term::ANSIColor; + +sub main { + my $argc = $#ARGV + 1; + if ($argc < 1) { + print colored("Failed!\n", 'bold red') + . "Missing argument, 1 needed " + . colored("[user]", 'bold') + . "\n"; + exit 1; + } + my $usr = $ARGV[0]; + system( + '/usr/local/bin/dash', + '-c', + "rmuser << EOF +" . $usr . " +y +y +EOF" + ); + exit; +} + +main(); + +__END__ -- cgit v1.2.3