$PATH question

James Mcphee jmcphe at gmail.com
Thu Feb 27 13:32:41 MST 2014


dash uses /etc/profile, ~/.profile, and $ENV (if available).  grep your
username from /etc/passwd to find your shell.


On Thu, Feb 27, 2014 at 12:04 PM, sean <sean.a.ritzler at gmail.com> wrote:

> No, we want the output of :
>
> which killsol.sh
>
> "which" tells you where "killsol.sh" is in your path.
>
> And by "doesn't work" I mean when it is apparently not found in your
> path. I want to see what "which" says when your shell does not run
> "killsol.sh" by itself.
>
> On Thu, Feb 27, 2014 at 11:59 AM, Dazed_75 <lthielster at gmail.com> wrote:
> > Sean, there is no output from killsol.sh.  It either kills the desired
> > process or does nothing.  And it DOES work when it actually gets run.
> >
> > Nathan, .profile actually checks to see if the is a .bashrc and if so,
> runs
> > it so putting in what you suggest would create an infinite loop.  BUT,
> you
> > gave me a clue.  I think ubuntu actually uses dash for the login shell
> > though bash is the default user shell.  THAT may be why .profile does not
> > get run for the login shell.
> >
> >
> > On Thu, Feb 27, 2014 at 10:49 AM, Nathan England <plug-discuss at nmecs.com
> >
> > wrote:
> >>
> >>
> >> I know different shells source different files when started, I'm curious
> >> to know which shell you are using.
> >> (konsole, gnome-terminal, ...)
> >>
> >> If it works after sourcing your .profile then I would bet you need to
> have
> >> a .bashrc file with a line that says source ~/.profile.
> >>
> >> Like Kitepilot, I too am curious to know what
> >>
> >> which foo.sh
> >> or
> >> whereis foo.sh
> >>
> >> tells us.
> >>
> >>
> >>
> >> On 2/27/2014 8:24 AM, Dazed_75 wrote:
> >>
> >> Prior to mu sourcing .profile, those commands showed nothing.  Once I
> ran
> >> . .profile, I get what I expected:
> >>
> >> larry at hammerhead:~$ which killsol.sh
> >> /home/larry/bin/killsol.sh
> >> larry at hammerhead:~$ type killsol.sh
> >> killsol.sh is /home/larry/bin/killsol.sh
> >> larry at hammerhead:~$
> >>
> >> so the question really comes down to why is .profile not being run on
> >> login (I already said I do not have the two files which might prevent
> it).
> >> This is Ubuntu 12.04 BTW.
> >>
> >>
> >>
> >> On Thu, Feb 27, 2014 at 6:50 AM, <kitepilot at kitepilot.com> wrote:
> >>>
> >>> Pls show the output of:
> >>> which foo.sh
> >>> or
> >>> type foo.sh
> >>> ET
> >>>
> >>>
> >>> Dazed_75 writes:
> >>>>
> >>>> I thought $PATH contained the series of paths searched to find an
> >>>> executable file by the name specified on the command line.
>  Specifically
> >>>> if
> >>>> my $ENV contains a $PATH which reads:
> >>>> /home/larry/bin:<more paths>
> >>>> that an executable file like foo.sh found in /home/larry/bin/ could be
> >>>> run
> >>>> by simply typing foo.sh on the command line.  What am I doing wrong as
> >>>> it
> >>>> does not work though it does if I type ./bin/foo.sh while in
> >>>> /home/larry/?
> >>>> --
> >>>> Dazed_75 a.k.a. Larry
> >>>> Please protect my address like I protect yours. When sending messages
> to
> >>>> multiple recipients, use the BCC: (Blind carbon copy). Remove
> addresses
> >>>> from a forwarded message body before clicking Send.
> >>>
> >>> ---------------------------------------------------
> >>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> >>> To subscribe, unsubscribe, or to change your mail settings:
> >>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> >>
> >>
> >>
> >>
> >> --
> >> Dazed_75 a.k.a. Larry
> >>
> >> Please protect my address like I protect yours. When sending messages to
> >> multiple recipients, use the BCC: (Blind carbon copy). Remove addresses
> from
> >> a forwarded message body before clicking Send.
> >>
> >>
> >> ---------------------------------------------------
> >> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> >> To subscribe, unsubscribe, or to change your mail settings:
> >> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> >>
> >>
> >> ---------------------------------------------------
> >> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> >> To subscribe, unsubscribe, or to change your mail settings:
> >> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> >
> >
> >
> >
> > --
> > Dazed_75 a.k.a. Larry
> >
> > Please protect my address like I protect yours. When sending messages to
> > multiple recipients, use the BCC: (Blind carbon copy). Remove addresses
> from
> > a forwarded message body before clicking Send.
> >
> > ---------------------------------------------------
> > PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> > To subscribe, unsubscribe, or to change your mail settings:
> > http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>



-- 
James McPhee
jmcphe at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20140227/91796319/attachment.html>


More information about the PLUG-discuss mailing list