Help for this page

Select Code to Download


  1. or download this
    setpath.pl [ENV_VAR] [:NEWPATH | NEWPATH: | -[-]OLDPATH]
    
    ...
      NEWPATH: prepends "NEWPATH:" at start of ENV_VAR
      -OLDPATH deletes first instance of "OLDPATH" from ENV_VAR
      --OLDPATH deletes all instances of "OLDPATH" from ENV_VAR
    
  2. or download this
     setpath.pl VAR1 :NEWPATH VAR2 OTHERPATH: VAR3 --BADPATH
    #
    # shell function would be:
    function setpath { /full/path/to/setpath.pl $*; if ... };
    
  3. or download this
    #!/usr/bin/perl
    
    ...
        print OUT "export $varname=$varval\n";
    }
    exit(0);