I know you can do mkdir to create a directory and touch to create a file, but is there no way to do both operations in one go?
mkdir
touch
i.e. if I wa
as I saw and test in a unix forum this solves the problem
ptouch() { for p in "$@"; do _dir="$(dirname -- "$p")" [ -d "$_dir" ] || mkdir -p -- "$_dir" touch -- "$p" done }