summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2019-04-21 18:08:05 +0200
committerJonas Smedegaard <dr@jones.dk>2019-04-21 18:08:05 +0200
commit11d941d9e56d41d3505793d8558f12401998243a (patch)
tree48cffc90195d4dc3183d615d73a3f0fab2edd137
parent3b4c5806e9bb057b5599e9fba0ef65e3c2adc660 (diff)
Avoid needless subshells.
-rwxr-xr-xlocalrmstaleaccounts16
1 files changed, 8 insertions, 8 deletions
diff --git a/localrmstaleaccounts b/localrmstaleaccounts
index b185cfc..b6e9a05 100755
--- a/localrmstaleaccounts
+++ b/localrmstaleaccounts
@@ -2,22 +2,22 @@
set -e
-exit1() (
+exit1() {
echo >&2 "ERROR: $1"
exit 1
-)
+}
-warn() (
+warn() {
echo >&2 "WARNING: $1"
-)
+}
-info() (
+info() {
echo >&2 "INFO: $1"
-)
+}
-remove_account() (
+remove_account() {
localrmaccount "$1"
-)
+}
for user in $@; do
home=$(getent passwd "$user" | cut -d: -f6)