From 6f0bfe706997215361c4c8ac2ccad1f0cf762740 Mon Sep 17 00:00:00 2001 From: Yan Date: Sat, 7 Sep 2024 23:18:26 -0700 Subject: [PATCH] good practice --- other/25/run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/other/25/run b/other/25/run index 7b8eb7b..2bafc26 100755 --- a/other/25/run +++ b/other/25/run @@ -6,7 +6,7 @@ read FLAG < /flag read DEST < <(tr -cd "[a-z0-9/]" <<< "$1") [[ "$DEST" == /* ]] || exit 1 -OLDIFS=$IFS +OLDIFS="$IFS" IFS="/" FILE="" for FRAGMENT in $DEST @@ -20,6 +20,7 @@ do chmod 000 "$FILE" done +IFS="$OLDIFS" umask 777 touch "$DEST"