Mime-Version: |
1.0 (Apple Message framework v752.2) |
Content-Type: |
text/plain; charset=US-ASCII; delsp=yes; format=flowed |
Date: |
Fri, 1 Jun 2007 10:23:57 -0700 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
7bit |
Sender: |
|
Parts/Attachments: |
|
|
On Jun 1, 2007, at 10:03 AM, John A.M. Darnell wrote:
> The cat's away and the mice will play...at least I'm playing
> with bash
> scripting (just because I have the time and I would like to
> know...). I'm
> having a rough time getting off the ground, however. I am writing
> a very,
> very simple script that looks like this:
>
> #!/bin/bash
> echo "Hello $USER."
> ls
>
> This file is saved as lst.bsh.
>
> I am then executing this very simple script in Terminal with this
> command:
>
> bash lst.bsh
>
> Nothing happens except that the command prompt returns. I see no
> echo nor
> do I see a file listing.
>
> What fundamental step am I missing?
You aren't missing anything that I can see. Works for me--getting
the script into a file using Mac Copy from the mail message,
cat > 1st.bsh
[Paste]
^d
My default shell is bash. Is yours? If not, try executing
bash
then
chmod u+x 1st.bsh
./1st.bsh
(That dance shouldn't be necessary.)
--John
|
|
|