What does this shell script do?

What does this shell script do?Category: Linux EssentialsAuthor "LinuxQuestions"What does this shell script do?
Linux Questions Staff asked 1 year ago

What does this shell script do?

FOO= /tmp/ foo
if [   !  –d  $FOO   ];   then
mkdir $FOO
fi
  • Creates /tmp/foo if it does not exist
  • Makes the /tmp/foo directory if a file by that name exists
  • Outputs a message to the screen
  • Creates /tmp/foo and raises an error if there is a problem
  • Nothing, since there is a problem with the conditions in the if statement

About the author