.
|_1
--|_2
----|_3
------|_4
--------|_test.txt
- Bash:
i="1/2/3/4" && mkdir -p $i && touch $i/test.txt
- PowerShell
New-Item -Type file -Force 1\2\3\4\test.txt
Upd.1:
Найдена фунцкия для bash:
mkfile() { mkdir -p "$1" && touch "$1"/"$2" }
- exmpl:
mkfile 1/2/3/4 test.txt