title: How do I run .sh or .bat files from Terminal?
body: <p>I have a pretty basic problem here, that has happened so haphazardly to me that up until now, I've just ignored it. I downloaded tomcat web server and "Murach's Java Servlets and JSP" book is telling me to navigate to the tomcat/bin directory and start the server my typing in Terminal</p>
  
  <p>$ startup</p>
  
  <p>However, I get the error</p>
  
  <pre><code>-bash: startup: command not found
  </code></pre>
  
  <p>The relevant files in this directory are startup.sh and startup.bat. Typing both of these returns the same error message</p>
  
  <p>So my questions are, what are .bat and sh files, and how do I run these files? I've read several tutorials for different languages and software programs, and some times when the tutorial says execute a bunch of files in the command line, I get a "command not found" error. Sometimes it works, sometimes it doesn't. This is perplexing to me, so what are some common solutions to solving these sort of "command not found" Terminal problems?</p>