<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: $PATH variable&amp;quot; word is to long&amp;quot; in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038067#M95964</link>
    <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;even in tcsh you cannot raise the limit of the number of characters allowed in an environment variable. The limit (4096) at Solaris10 is high, however.&lt;BR /&gt;&lt;BR /&gt;Keep in mind, that it is better in tcsh to deal with the (local) variable 'path' as array as with the environment variable PATH.&lt;BR /&gt;tcsh tracks the correspondence of 'path' and 'PATH' by itself automatically.&lt;BR /&gt;&lt;BR /&gt;To refine Clay's suggestion - which is the only resonable solution:&lt;BR /&gt;1) Check if the directory exists before appending it to path:&lt;BR /&gt;if (-f /more/to/add/to/path) then&lt;BR /&gt;set path=($path /more/to/add/to/path)&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;2) Create aliases for entries of directories you want to put into PATH, which contain only few executables:&lt;BR /&gt;instead of adding /path/to/script to path, where  /path/to/script/start_me is the only executable file, use&lt;BR /&gt;alias start_me /path/to/script/start_me&lt;BR /&gt;&lt;BR /&gt;3) Check for duplicates (links!) in path:&lt;BR /&gt;set addme=1&lt;BR /&gt;set to_add=/path/of/new/to/add&lt;BR /&gt;foreach p in ($path)&lt;BR /&gt;  if ($p == $to_add) then&lt;BR /&gt;    set addme=0&lt;BR /&gt;    breaksw&lt;BR /&gt;  endif&lt;BR /&gt;end&lt;BR /&gt;if ($addme) set path=($path $to_add)&lt;BR /&gt;&lt;BR /&gt;- /bin and /usr/bin are redundant entries&lt;BR /&gt;- contains /usr/local/bin really some files?&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
    <pubDate>Tue, 03 Apr 2007 16:38:45 GMT</pubDate>
    <dc:creator>Peter Nikitka</dc:creator>
    <dc:date>2007-04-03T16:38:45Z</dc:date>
    <item>
      <title>$PATH variable" word is to long"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038065#M95962</link>
      <description>Hi All,&lt;BR /&gt;Could someone help me to find a solution regarding the PATH variable in .tcshrc file.&lt;BR /&gt;I have to add some paths in this in order to run some scripts but there are a loot of directories when the script resides and when i write them it shows me the message below.&lt;BR /&gt;When i log into the system:&lt;BR /&gt;&lt;BR /&gt;"word is to long"&lt;BR /&gt;%&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Endrin</description>
      <pubDate>Tue, 03 Apr 2007 15:09:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038065#M95962</guid>
      <dc:creator>Voda</dc:creator>
      <dc:date>2007-04-03T15:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: $PATH variable" word is to long"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038066#M95963</link>
      <description>A Google search indicates that this is a hard-coded limit in tcsh. One way to shorten the PATH for deeply nested directories is to create symbolic links so that you can skip over several layers of directories and thus use a shorter PATH. Your other problem may be that you are already sourcing /etc/PATH and PATH is already too long. A very long /etc/PATH is likely a security hole.</description>
      <pubDate>Tue, 03 Apr 2007 15:25:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038066#M95963</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-04-03T15:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: $PATH variable" word is to long"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038067#M95964</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;even in tcsh you cannot raise the limit of the number of characters allowed in an environment variable. The limit (4096) at Solaris10 is high, however.&lt;BR /&gt;&lt;BR /&gt;Keep in mind, that it is better in tcsh to deal with the (local) variable 'path' as array as with the environment variable PATH.&lt;BR /&gt;tcsh tracks the correspondence of 'path' and 'PATH' by itself automatically.&lt;BR /&gt;&lt;BR /&gt;To refine Clay's suggestion - which is the only resonable solution:&lt;BR /&gt;1) Check if the directory exists before appending it to path:&lt;BR /&gt;if (-f /more/to/add/to/path) then&lt;BR /&gt;set path=($path /more/to/add/to/path)&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;2) Create aliases for entries of directories you want to put into PATH, which contain only few executables:&lt;BR /&gt;instead of adding /path/to/script to path, where  /path/to/script/start_me is the only executable file, use&lt;BR /&gt;alias start_me /path/to/script/start_me&lt;BR /&gt;&lt;BR /&gt;3) Check for duplicates (links!) in path:&lt;BR /&gt;set addme=1&lt;BR /&gt;set to_add=/path/of/new/to/add&lt;BR /&gt;foreach p in ($path)&lt;BR /&gt;  if ($p == $to_add) then&lt;BR /&gt;    set addme=0&lt;BR /&gt;    breaksw&lt;BR /&gt;  endif&lt;BR /&gt;end&lt;BR /&gt;if ($addme) set path=($path $to_add)&lt;BR /&gt;&lt;BR /&gt;- /bin and /usr/bin are redundant entries&lt;BR /&gt;- contains /usr/local/bin really some files?&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Tue, 03 Apr 2007 16:38:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038067#M95964</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-04-03T16:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: $PATH variable" word is to long"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038068#M95965</link>
      <description>As i can see there is no hope on extending the PATH variable size on which i wanted to add the directories where the scripts reside.&lt;BR /&gt;&lt;BR /&gt; I have installed Sudo version 1.6.8p12 and have some scripts on a lot  of directories. In the sudoers file i have defined them like below:&lt;BR /&gt;/ddd/sss/ddd/* but i have recently  heard that this version doesn't work with the wildcard.&lt;BR /&gt;So i have to add the full path of each script in the sudoers file in order to run the scripts.&lt;BR /&gt;As there are a lot of them i wanted to know if exist any size limitation on the sudoers file? &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Apr 2007 09:15:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038068#M95965</guid>
      <dc:creator>Voda</dc:creator>
      <dc:date>2007-04-06T09:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: $PATH variable" word is to long"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038069#M95966</link>
      <description>Case resolved by implementing sudo</description>
      <pubDate>Mon, 07 May 2007 07:06:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/path-variable-quot-word-is-to-long-quot/m-p/5038069#M95966</guid>
      <dc:creator>Voda</dc:creator>
      <dc:date>2007-05-07T07:06:18Z</dc:date>
    </item>
  </channel>
</rss>

