Sponsored Content
Full Discussion: adding PATH variable
Top Forums UNIX for Dummies Questions & Answers adding PATH variable Post 302136678 by azbest on Wednesday 19th of September 2007 05:45:00 AM
Old 09-19-2007
try this in your shell

Code:
PATH=$PATH:/usr/uscr:/usr/rscr; export PATH; echo $PATH

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Adding PATH variable in the startup scripts

Hi, I got a error message The environmental variable AUTOSYS is not set ! I think I require to to add a path to PATH variable in the startup scripts in the home dir. I tried using set PATH= but it is not setting the PATH when i do the echo $PATH , i dont get the new PATH reflected, Is... (5 Replies)
Discussion started by: rajanishshetty
5 Replies

2. UNIX for Dummies Questions & Answers

Adding default search path for CPP

Hi there, I have built myself a GCC (3.4.4) for PowerPC with a cross compilation toolchain running on a x86, together with glibc-2.3.4 and binutils-2.16. On the PowerPC there is a system runnign already (only console ofc, nothing "cosy", kernel-2.6.15). So my question is how to propperly... (1 Reply)
Discussion started by: boyanov
1 Replies

3. Shell Programming and Scripting

Sed variable substitution when variable constructed of a directory path

Hello, i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem. my var1 is a string constructed like this: filename1 filerev1 filepath1 my var2 is another string constructed like this: filename2 filerev2 filepath2 when i do... (2 Replies)
Discussion started by: alrinno
2 Replies

4. Shell Programming and Scripting

remove a path from PATH environment variable

Hi I need a script which will remove a path from PATH environment variable. For example $echo PATH /usr/local/bin:/usr/bin:test/rmve:/usr/games $echo rmv test/rmve Here I need a shell script which will remove rmv path (test/rmve) from PATH... (9 Replies)
Discussion started by: madhu84
9 Replies

5. Shell Programming and Scripting

one liner to extract path from PATH variable

Hi, Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable? for eg: suppose the PATH is being set as follows PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4 ... (2 Replies)
Discussion started by: royalibrahim
2 Replies

6. Shell Programming and Scripting

Appending a path in user's PATH variable

Hello Folks, I want to append a path in user's PATH variable which should be available in current session. Background Numerous persons will run a utility. Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

7. Shell Programming and Scripting

Path a variable to sed that includes a path

Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example start="BEGIN /home/mavkoup/data" end="END" sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies

8. Shell Programming and Scripting

Shell or Perl (adding quote around path)

Hi Experts, I have a line as below: Text 351:2139 /opt/bo/boexi30/bobje/data/.bobj/registry/software/business objects/suite 12.0/olap intelligence/occa(o) What I need is: add a single quote around the path as below: chown 351:2139... (4 Replies)
Discussion started by: apatil65
4 Replies

9. HP-UX

Adding Directories to PATH in HP-UX with csh

HI Guys, I am truing to add some directories to the productive HP-UX (like /usr/sbin) the problem is that i tried some methods like (export) and setenv but i failed. I add some logs output of the commands to provide you with more info . the user which I am trying to add this path is different... (5 Replies)
Discussion started by: barry1946
5 Replies

10. Shell Programming and Scripting

Adding to the end of the path in .profile

Hi there, I have the following in my path: export PATH=/usr/bin:/usr/sbin But I want to change it programmatically(for the purpose of JBoss automatic(ansible) installs) to: export PATH=/usr/bin:/usr/sbin:/usr/jdk/jdk1.8.0_60 and after that I need to insert the JAVA_HOME programmatically,... (7 Replies)
Discussion started by: hvdalsen
7 Replies
whereis(1)						      General Commands Manual							whereis(1)

Name
       whereis - locate source, binary, and or manual for program

Syntax
       whereis [-sbm] [-u] [-SBM dir... -f] name...

Description
       The command locates source/binary and manuals sections for specified files.  The supplied names are first stripped of leading pathname com-
       ponents and any (single) trailing extension of the form ``.ext'', for example,``.c''.  Prefixes of ``s.'' resulting from use of source code
       control are also dealt with.  The command then attempts to locate the desired program in a list of standard places.

Options
       -S dir
	  Search for source files in specified directory.

       -B dir
	  Search for binary files in given directory.

       -M dir
	  Search for manual section files in given directory.

       -b Searches only for binary files.

       -f Terminates last directory list created from use of -S, -B or -M flags and signals the start of file names.

       -m Searches only for manual section files.

       -s Searches only for source files.

       -u Searches for files that do not have one of binary, source or manual section files.  A file is said to be unusual if it does not have one
	  entry of each requested type.  Thus ``whereis -m -u *'' asks for those files in the current directory which have no documentation.

Examples
       The following finds all the files in which are not documented in with source in
       cd /usr/ucb
       whereis -u -M /usr/man/man1 -S /usr/src/cmd -f *

Restrictions
       Since the program uses to run faster, pathnames given with the -M -S and -B must be full.  That is, they must begin with a ``/''.

Files
       /usr/src/*
       /usr/{doc,man}/*
       /lib, /etc, /usr/{lib,bin,ucb,old,new,local}

																	whereis(1)
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy