Dear Gyepi,
> #!/bin/sh
> type=$1
>
> if [ "$type" eq "do" ]; then
> groupadd bar
> useradd foo ...
> gpasswd -a foo bar
> ...
>
> elif [ "$type" eq "undo" ]; then
> userdel foo
> groupdel bar
> ...
> fi
Thanks for the example. This is certainly an interesting
technique. But I still fail to see why going from perl to sh(1)
makes it easier to undo something.
Moreover, I would guess that such undo-able scripts are
possible only in specialised domains.
If I do a chgrp(1) or chmod(1), there is no straightforward
to undo it, unless I save the previous file properties some
place. Even worse for rm(1) and rmdir(1).
peace, || Shristi: Helping autistic children:
--{kr.pA} || http://tinyurl.com/3xytg
--
Patriotism is supporting your country all the time and the government when
it deserves it. -- Mark Twain, author and humorist (1835-1910)
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm