# Executing Shell Scripts

**URL:** <https://community.unix.com/t/executing-shell-scripts/155890>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [September 6, 2005, 7:41pm UTC](https://community.unix.com/t/executing-shell-scripts/155890 "2005-09-06T19:41:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BuyoCat](https://community.unix.com/letter_avatar/buyocat/32/6_22734026db12803ebb3e059622ac3534.png) [@BuyoCat](https://community.unix.com/u/BuyoCat)\
**Post date:** [September 6, 2005, 7:41pm UTC](https://community.unix.com/t/executing-shell-scripts/155890/1 "2005-09-06T19:41:37Z")

</div>

Hi, I'm pretty new to Unix and I just have a question concerning making a script executable without putting the "sh" command before it. In case it makes the difference I am on an Apple computer using the Terminal. Anyway here is the little test code I wrote followed by the commands I took to try to make it executable on its own.

Script  
#! /bin/sh  
# comments  
echo "blah"

heh that's it, it works when I do enter sh Script  
now then the code I tried to use to execute it

chmod u+x Script  
pwd ; echo $PATH

and though no errors came up, it didn't work. So any insight would be really appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![zazzybob](https://community.unix.com/user_avatar/community.unix.com/zazzybob/32/112_2.png) [@zazzybob](https://community.unix.com/u/zazzybob)\
**Post date:** [September 7, 2005, 1:11am UTC](https://community.unix.com/t/executing-shell-scripts/155890/2 "2005-09-07T01:11:26Z")

</div>

Please review our [rules](http://www.unix.com/showthread.php?t=2971). Duplicate posting is not permitted.

Thanks  
ZB
