1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-25 12:58:35 -06:00
random/touch2

15 lines
230 B
Text
Raw Normal View History

2022-01-02 22:35:07 -06:00
#!/bin/sh
2021-04-19 13:54:49 -05:00
# It makes the parent folders (if needed) while touch-ing.
2022-01-15 22:40:18 -06:00
if [ $# -ge 1 ]; then
for f in $@
do
mkdir -p "$(dirname "$f")"
touch "$f"
done
else
echo "No filenames passed."
2022-01-22 18:46:56 -06:00
exit 1
2022-01-15 22:40:18 -06:00
fi