Shell - "Shell" is a program, which facilitates the interaction between the user and the operating system (kernel). There are many shell implementations available, like sh, Bash, C shell, Z shell, etc.
The shell will try to create directory test and then, only if it was successful will try create file inside it. So you may interrupt a sequence of steps if one of them failed.
BTW, in bash a semi-colon is a statement separator, not a statement terminator, which is a new-line. So if you only have one statement on a line then the ; at end-of-line are superfluous. Not doing any harm, just a waste of keystrokes (unless you enjoy typing semi-colons).
What does $# mean in shell? I have code such as if [ $# -eq 0 ] then I want to understand what $# means, but Google search is very bad for searching these kinds of things.
A bashism is a shell feature which is only supported in bash and certain other more advanced shells. It will not work under busybox sh or dash (which is /bin/sh on a lot of distros), or certain other shells like the /bin/sh provided on FreeBSD.
I often come across $?, $0, $1, $2, etc in shell scripting. I know that $? returns the exit status of the last command: echo "this will return 0" echo $? But what do the others do? What ...
How do I know if a variable is set in Bash? For example, how do I check if the user gave the first parameter to a function? function a { # if $1 is set ? }