mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-27 05:28:37 -06:00
touch2 now works with multiple inputs
This commit is contained in:
parent
07a240fa8a
commit
8abb9894b8
1 changed files with 9 additions and 2 deletions
11
touch2
11
touch2
|
@ -2,5 +2,12 @@
|
||||||
|
|
||||||
# It makes the parent folders (if needed) while touch-ing.
|
# It makes the parent folders (if needed) while touch-ing.
|
||||||
|
|
||||||
mkdir -p "$(dirname "$1")" &&
|
if [ $# -ge 1 ]; then
|
||||||
touch "$1"
|
for f in $@
|
||||||
|
do
|
||||||
|
mkdir -p "$(dirname "$f")"
|
||||||
|
touch "$f"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "No filenames passed."
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue