Let's say the directory
~/this_dir doesn't exist.
I need to be able to run
touch ~/this_dir/new.txt to create
Is there a simple way to make touch also create the directory?
Or an alternative command which would achieve the same thing?
touch, and I don't think
cpwill do this either. The answer using
installis neat, though, if you want efficiency in a script moreso than being obvious or clear to readers.