Re: My bash script is missing something - what?

2016-10-10 Thread Tony Baldwin
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.

Re: My bash script is missing something - what?

2016-10-10 Thread gricketson
On 2016-10-10 10:57, Greg Wooledge wrote: > On Mon, Oct 10, 2016 at 11:51:37AM -0400, songbird wrote: >> Richard Owlett wrote: >> > I have a trivial bash script named test.sh which has been marked >> > as executable. > >> also remember that test itself is a builtin >> or binary on some systems.

Re: PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Greg Wooledge
On Mon, Oct 10, 2016 at 05:19:34PM +0100, Peter Hillier-Brook wrote: > Ignoring your youth, you need to precede your script with a valid path > such as './' :-) He did.

Re: PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Peter Hillier-Brook
On 10/10/16 16:46, Richard Owlett wrote: > On 10/10/2016 10:04 AM, Nicolas George wrote: >> Le nonidi 19 vendémiaire, an CCXXV, Richard Owlett a écrit : >>> 1. What Debian oriented Bash Tutorial should I be reading? >> >> My first tutorial advice: do not do bash. I advise to do either or >> both

Re: My bash script is missing something - what?

2016-10-10 Thread Greg Wooledge
On Mon, Oct 10, 2016 at 11:51:37AM -0400, songbird wrote: > Richard Owlett wrote: > > I have a trivial bash script named test.sh which has been marked > > as executable. > also remember that test itself is a builtin > or binary on some systems. It's required by POSIX, so it will be a command

Re: My bash script is missing something - what?

2016-10-10 Thread songbird
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

Re: PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Richard Owlett
On 10/10/2016 10:04 AM, Nicolas George wrote: Le nonidi 19 vendémiaire, an CCXXV, Richard Owlett a écrit : 1. What Debian oriented Bash Tutorial should I be reading? My first tutorial advice: do not do bash. I advise to do either or both of: learn standard sh for portable scripts and for more

Re: PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Richard Owlett
On 10/10/2016 10:01 AM, Greg Wooledge wrote: On Mon, Oct 10, 2016 at 09:58:44AM -0500, Richard Owlett wrote: 1. What Debian oriented Bash Tutorial should I be reading? http://mywiki.wooledge.org/BashGuide is decent. Now bookmarked. Neglected to do so last time I was looking. However, I

Re: PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Nicolas George
Le nonidi 19 vendémiaire, an CCXXV, Richard Owlett a écrit : > 1. What Debian oriented Bash Tutorial should I be reading? My first tutorial advice: do not do bash. I advise to do either or both of: learn standard sh for portable scripts and for more advanced scripting learn a modern shell less

Re: PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Greg Wooledge
On Mon, Oct 10, 2016 at 09:58:44AM -0500, Richard Owlett wrote: > 1. What Debian oriented Bash Tutorial should I be reading? http://mywiki.wooledge.org/BashGuide is decent. However, I might be slightly biased.

PROGRESS - was [Re: My bash script is missing something - what?]

2016-10-10 Thread Richard Owlett
On 10/10/2016 8:21 AM, Greg Wooledge wrote: On Mon, Oct 10, 2016 at 08:10:33AM -0500, Richard Owlett wrote: On 10/10/2016 8:00 AM, Robert Parker wrote: you need to do: ./test.sh instead. That just fails differently by responding: : No such file or directory Carriage return. Did you edit

Re: My bash script is missing something - what?

2016-10-10 Thread Greg Wooledge
On Mon, Oct 10, 2016 at 04:10:22PM +0200, Nicolas George wrote: > Le nonidi 19 vendémiaire, an CCXXV, Greg Wooledge a écrit : > > > That just fails differently by responding: > > > > > > : No such file or directory > > > > Carriage return. Did you edit this script with a Microsoft Windows > >

Re: My bash script is missing something - what?

2016-10-10 Thread Nicolas George
Le nonidi 19 vendémiaire, an CCXXV, Greg Wooledge a écrit : > > That just fails differently by responding: > > > > : No such file or directory > > Carriage return. Did you edit this script with a Microsoft Windows > program, perhaps? The shebang line (#!/bin/bash) probably ends with > a

Re: My bash script is missing something - what?

2016-10-10 Thread Thomas Schmitt
Hi, Richard Owlett wrote: > > > bash: test.sh: command not found Robert Parker wrote: > > you need to do:./test.sh Richard Owlett wrote: > That just fails differently by responding: > : No such file or directory > At the moment I using >

Re: My bash script is missing something - what?

2016-10-10 Thread Greg Wooledge
On Mon, Oct 10, 2016 at 08:10:33AM -0500, Richard Owlett wrote: > On 10/10/2016 8:00 AM, Robert Parker wrote: > >you need to do: > >./test.sh > >instead. > > > > That just fails differently by responding: > > : No such file or directory Carriage return. Did you edit this script with a

Re: My bash script is missing something - what?

2016-10-10 Thread Robert Parker
1. You have to be in the directory where the script resides. 2. Then: chmod +x test.sh 3. Then: ./test.sh On Mon, Oct 10, 2016 at 8:10 PM, Richard Owlett wrote: > On 10/10/2016 8:00 AM, Robert Parker wrote: > >> you need to do: >> ./test.sh >> instead. >> >> > That just

Re: My bash script is missing something - what?

2016-10-10 Thread Lars Noodén
On 10/10/2016 04:10 PM, Richard Owlett wrote: > On 10/10/2016 8:00 AM, Robert Parker wrote: >> you need to do: >> ./test.sh >> instead. >> > > That just fails differently by responding: > > : No such file or directory Where ever the script is, it does have to be in the $PATH or else you must

Re: My bash script is missing something - what?

2016-10-10 Thread Richard Owlett
On 10/10/2016 8:00 AM, Robert Parker wrote: you need to do: ./test.sh instead. That just fails differently by responding: : No such file or directory I had seen that suggestion before while searching the web - don't recall a page reference. At the moment I using

Re: My bash script is missing something - what?

2016-10-10 Thread Robert Parker
you need to do: ./test.sh instead. On Mon, Oct 10, 2016 at 7:54 PM, 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

My bash script is missing something - what?

2016-10-10 Thread Richard Owlett
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