Firstly, this is my first approach to shell scripts. I only have experience with HTML and CSS:]
What I want to do is set up a simple folder structure and prompt the user in the dialog box to set a name for the root folder. I ran this shell script through an OS X service or Keyboard Maestro hotkey.
This is what I came up with so far:
#!/bin/sh echo -n "Enter the project name:" read -e NAME mkdir -p ~/Desktop/$NAME mkdir -p ~/Desktop/$NAME/subfolder1 mkdir -p ~/Desktop/$NAME/subfolder2
Obviously, there is some error - the variable will not be transferred and the root folder will not be created. I also read that I should use a "dialog" to request input, but I could not write something that works.
Your help is greatly appreciated. Thanks.
source share