-------- Forwarded Message --------
Subject: Re: My bash script is missing something - what?
To: Richard Owlett <rowl...@cloud85.net>
References: <57fb8f79.9010...@cloud85.net>
From: Anthony Baldwin <baldwinling...@gmx.com>
Message-ID: <3e26c189-eab5-d400-c3c7-5cc1d7321...@gmx.com>
Date: Mon, 10 Oct 2016 13:06:59 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Icedove/45.2.0
MIME-Version: 1.0
In-Reply-To: <57fb8f79.9010...@cloud85.net>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
On 10/10/2016 08:54 AM, Richard Owlett wrote:
I have a trivial bash script named test.sh which has been marked as
executable.
Its contents are:
#!/bin/bash
cat /etc/debian_version
mount | grep 'on / '
In a terminal I type:
test.sh
The response is:
bash: test.sh: command not found
I'm using Squeeze with Gnome2 as DE.
What's wrong?
TIA
Is it in your $PATH? (i.e in ~/bin, if that is added to your path, or in
/usr/local/bin, or /usr/bin, etc. I put all my bash (or tcl or python or
ruby or perl)scripts in /home/me/bin, which I have added to my $PATH
If the script is not in your path, you will have to cd to the directory
it is in and do
$ ./test.sh
with that ./
I think you got that answer already,
but, as a side note (just a thought):
you could make this a one-liner, and even make an alias for it in your
.bashrc,
like
# frp for find root partition
alias frp = cat /etc/debian_version && mount | grep 'on / '
Then you could simply type frp and get the info you want.
close your terminal and start a new one to use the alias once it's added
to the .bashrc file, of course)
--
http://www.baldwinlinguas.com
translations, localization,
multilingual web development
EN, ES, FR, PT