I'm writing a script that replaces the mkdir -p command. Here is what I have so far:
#!/bin/sh
n=1;
max=50;
while [ "$n" -le "$max" ]; do
mkdir "s$n"
n='expr "$n" + 1';
done
I should be able to then use this script to type in aaa/bbb/ccc and it'll make these directories.
-p"command" are you referring to? Can you provide input and expected output? What does not work in what you have thus far tried?alias mkdir='mkdir -p'if all you're trying to do is save yourself some typing.