From: Chris Ridd on
On 2010-07-12 22:51:17 +0100, Ric said:

> On 12 July, 21:59, Richard Kettlewell <r...(a)greenend.org.uk> wrote:
>> Ric <infobub...(a)gmail.com> writes:
>>> Ahaha! ignore last post: just added those to the PATH command and
>>> we're up and running: however when I restart terminal it forgets the
>>> setting. �Where is the file that the SET command lists? �Presumably I
>>> need to edit this in Pico and add the full path string to the end?
>>
>> Generally one (or more) of .profile, .bash_profile or .bashrc.
>>
>> If it's coming up wrong when you start then you'll most likely find
>> there's an incorrect PATH setting in one of them already.
>>
>> --http://www.greenend.org.uk/rjk/
>
> it was .bash_profile, thanks.
> added PATH=/usr/bin:/usr/sbin:/bin:/usr/bin:/$PATH to this and it now
> works.

That slash in front of $PATH should be removed.

--
Chris

From: Richard Kettlewell on
Chris Ridd <chrisridd(a)mac.com> writes:
> On 2010-07-12 21:17:02 +0100, Ric said:

>> Guys, ran PATH=/usr/bin:/usr/sbin:$PATH in terminal, and it executes,
>> but when I then try an "ls" command it's still not found.
>> After this, running "set" gives
>
> No you didn't run what I typed, because you ended up with:
>
>> PATH='/usr/bin:/usr/sbin:$'
>
> Re-run it, without the apostrophes. Apostrophes and quotes are very
> special in all shells (including bash) and you should never put them
> in automatically unless you know what you're doing. (And you don't, at
> least not yet :-)

The '' in that case are added by set and don't reflect what was typed.

chymax$ xone=foo
chymax$ xtwo="foo bar"
chymax$ xthree=foo\$bar
chymax$ set|grep ^x
xone=foo
xthree='foo$bar'
xtwo='foo bar'

--
http://www.greenend.org.uk/rjk/
From: Chris Ridd on
On 2010-07-13 09:31:40 +0100, Richard Kettlewell said:

> Chris Ridd <chrisridd(a)mac.com> writes:
>> On 2010-07-12 21:17:02 +0100, Ric said:
>
>>> Guys, ran PATH=/usr/bin:/usr/sbin:$PATH in terminal, and it executes,
>>> but when I then try an "ls" command it's still not found.
>>> After this, running "set" gives
>>
>> No you didn't run what I typed, because you ended up with:
>>
>>> PATH='/usr/bin:/usr/sbin:$'
>>
>> Re-run it, without the apostrophes. Apostrophes and quotes are very
>> special in all shells (including bash) and you should never put them
>> in automatically unless you know what you're doing. (And you don't, at
>> least not yet :-)
>
> The '' in that case are added by set and don't reflect what was typed.

Indeed, but the trailing single $ sign is suggestive that some
unexpected quoting did occur. Also the separation of the $ from the
PATH is curious.

--
Chris

From: Rowland McDonnell on
Chris Ridd <chrisridd(a)mac.com> wrote:

[snip]
> Re-run it, without the apostrophes. Apostrophes and quotes are very
> special in all shells (including bash)

In all Unix command shells, you mean. There are other forms of shell.

> and you should never put them in
> automatically unless you know what you're doing. (And you don't, at
> least not yet :-)

[snip]

Or you could do what I've always done, which is ask a Unix guru what
incantation to type and follow directions exactly without trying to
understand this incomprehensible stuff.

Rowland.

--
Remove the animal for email address: rowland.mcdonnell(a)dog.physics.org
Sorry - the spam got to me
http://www.mag-uk.org http://www.bmf.co.uk
UK biker? Join MAG and the BMF and stop the Eurocrats banning biking