Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #173387

Re: My bash script is missing something - what?

From Lars Noodén <lars.nooden@gmail.com>
Newsgroups linux.debian.user
Subject Re: My bash script is missing something - what?
Date 2016-10-10 15:30 +0200
Message-ID <sqIOu-1Mr-13@gated-at.bofh.it> (permalink)
References <sqIlx-1ni-27@gated-at.bofh.it> <sqIv8-1FC-37@gated-at.bofh.it> <sqIEO-1J7-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 run it using including a relative or absolute path to its location.

About your error message "bash: test.sh: command not found", you might
try putting the full paths to mount and grep in your script.  Or else
explicitly set the $PATH variable to something useful at the beginning
of the script.

If that was not it, you can use the set -x option with bash to trace the
script's actions.

	#!/bin/bash -x

That prints out each line as it will be run just before it is actually
run, to see what precisely is causing the failure.

Regards,
Lars

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

My bash script is missing something - what? Richard Owlett <rowlett@cloud85.net> - 2016-10-10 15:00 +0200
  Re: My bash script is missing something - what? Robert Parker <rlp1938@gmail.com> - 2016-10-10 15:10 +0200
    Re: My bash script is missing something - what? Richard Owlett <rowlett@cloud85.net> - 2016-10-10 15:20 +0200
      Re: My bash script is missing something - what? Robert Parker <rlp1938@gmail.com> - 2016-10-10 15:30 +0200
      Re: My bash script is missing something - what? Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-10 15:30 +0200
        Re: My bash script is missing something - what? Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-10 16:20 +0200
        Re: My bash script is missing something - what? Nicolas George <george@nsup.org> - 2016-10-10 16:20 +0200
        PROGRESS - was [Re: My bash script is missing something - what?] Richard Owlett <rowlett@cloud85.net> - 2016-10-10 17:00 +0200
          Re: PROGRESS - was [Re: My bash script is missing something - what?] Nicolas George <george@nsup.org> - 2016-10-10 17:10 +0200
            Re: PROGRESS - was [Re: My bash script is missing something - what?] Richard Owlett <rowlett@cloud85.net> - 2016-10-10 17:50 +0200
              Re: PROGRESS - was [Re: My bash script is missing something - what?] Peter Hillier-Brook <phb@hbsys.plus.com> - 2016-10-10 18:30 +0200
                Re: PROGRESS - was [Re: My bash script is missing something - what?] Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-10 18:40 +0200
          Re: PROGRESS - was [Re: My bash script is missing something - what?] Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-10 17:10 +0200
            Re: PROGRESS - was [Re: My bash script is missing something - what?] Richard Owlett <rowlett@cloud85.net> - 2016-10-10 17:50 +0200
      Re: My bash script is missing something - what? Lars Noodén <lars.nooden@gmail.com> - 2016-10-10 15:30 +0200
      Re: My bash script is missing something - what? "Thomas Schmitt" <scdbackup@gmx.net> - 2016-10-10 15:40 +0200
  Re: My bash script is missing something - what? Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-10 18:00 +0200
  Re: My bash script is missing something - what? songbird <songbird@anthive.com> - 2016-10-10 18:00 +0200

csiph-web