Re: path keeps bloating with repeated entries on invoking subshells



On 2008-07-30, Rahul <nospam@xxxxxxxxxxxxxx> wrote:
In my tcshell I used to follow the construct:

set path=(./ ~/bin/ ~/bin/foocmds [snip]........ $path)

I thought this was the right way to go since I only append to the
systemwide path settings without overwriting anything as a user.

But yesterday I got a "word too long error" and on investigation I find
that each time I invoke a subshell (say, I made a change to the .cshrc or
added a new script to the bin) I find that the path keeps bloating up with
duplicate entries (I guess a side-effect of appending the $path at the
end).

Is there a smart-way around this?


Just set it to a fixed string every time instead of growing it.

export PATH=/bin:/usr/bin:/usr/local/bin:$HOME/myprogs

--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/
.



Relevant Pages

  • Re: Obamas landslide?
    ... and reducing budget deficit by increasing taxes. ... Due to extreme spam originating from Google Groups, ... If you want your postings to be seen by ...
    (rec.crafts.metalworking)
  • Re: Welding one of the worst occupations, according to WSJ
    ... If I remember the article right, they rated it by how physically hard ... Due to extreme spam originating from Google Groups, ... If you want your postings to be seen by ...
    (sci.engr.joining.welding)
  • Re: best way to weld together two 1/4" lead sheets?
    ... The backing plate would address melt-through nicely. ... Due to extreme spam originating from Google Groups, ... If you want your postings to be seen by ...
    (rec.crafts.metalworking)
  • Re: Help! Bridgeport slide kaput
    ... Otherwise the hand cranks would move it, ... Due to extreme spam originating from Google Groups, ... If you want your postings to be seen by ...
    (rec.crafts.metalworking)