Sponsored Content
Full Discussion: Path Environment Variable
Top Forums Shell Programming and Scripting Path Environment Variable Post 302070851 by Rakesh Ranjan on Saturday 8th of April 2006 06:38:45 AM
Old 04-08-2006
Sorry Tancy for I couldn't get u in my first reply. Since u had put this in Shell Q & A I mistook it for a question on shell. Anyway I can still help u a bit.

As I told u earlier the path of the command is stored in environment variable PATH. Now u have got two options to choose from either let Unix do the searching for u or u do it urself. If u use execlp or execvp Unix will do it for u.
But if u have decided to do the hard work urself I'll suggest u visit this link http://linuxgazette.net/111/ramankutty.html it shall clear all ur doubts.

Regards
Rakesh
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

System environment Path in Linux

HI there people!! I'm really new with this great OS. I just installed a RedHat Linux 7.1 on my unit. Got it to work on dual boot with my Windows 2000. And I have some problem... how do i change/modify the system environment path? Thanks... and sorry for the ignorance ;) (5 Replies)
Discussion started by: spine_me
5 Replies

2. UNIX for Advanced & Expert Users

How does the PATH and MANPATH environment variable get set?

Hi, How does the PATH and MANPATH environment variable get set? I want to add "/opt/SUNWspro/bin" to the search path for all the users. Where can I access this variable. I know in my home directory, depend on which shell I use, there are files such as .profile and .cshrc which I can edit to... (3 Replies)
Discussion started by: vtran4270
3 Replies

3. Shell Programming and Scripting

:: in PATH environment variable

whats the meaning of :: colon in PATH environment? /usr/local/bin:/usr/bin:/usr/local/gnu/bin::.:/usr/local/bin:/usr/bin:/usr/local/gnu/bin:/usr/local/bin and whats the meaning of // in PATH ? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

4. Shell Programming and Scripting

problem in getting the path of environment variable set in bashrc in my shell script

hi all i have joined new to the group. i have set an variable in my bashrc file. .bashrc PROGHOME=/home/braf/braf/prog export PROGHOME but while using it in my shell script its path is not taken and i had to explicitly give the export command to set the path. in my script... (8 Replies)
Discussion started by: krithika
8 Replies

5. UNIX for Dummies Questions & Answers

Path Environment

How do we change path environment? (2 Replies)
Discussion started by: mehmetned
2 Replies

6. UNIX for Dummies Questions & Answers

Solaris 10.0 PATH environment

Hello, I am using Solaris 10.0 and defining PATH on command line by the following way: #export PATH=/usr/sfw/bin.... ...but after restart, Solaris forgets what I defined and I need to re-define the same PATH environment. I want to to get defined my PATH environment during booting... (10 Replies)
Discussion started by: XNOR
10 Replies

7. 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

8. Shell Programming and Scripting

Expand an environment variable in sed, when the variable contains a slash

I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash". sed -e 's/<HOME_DIRECTORY>/'$HOME'/'This gives me the following error: sed: -e expression #1, char 21: unknown option to `s'Obviously this is... (2 Replies)
Discussion started by: Ilja
2 Replies

9. UNIX for Dummies Questions & Answers

Need Help Setting Path and Environment Varibles

Hello all, I have a Mac OS X (10.7), and I need to set environment variables and paths for some programs I will be running. I have followed instructions and searched the Web for where to do this, but I can't seem to find an answer. I have tried using the VIM editor to write them into my .login,... (2 Replies)
Discussion started by: Tyler_92
2 Replies

10. Ubuntu

PATH environment variable

PATH is an environment variable. When I open a terminal say terminal 1 and set some path in PATH variable it gets set which I can see using ech $PATH. But when I open a new terminal say terminal 2 and fire echo $PATH why cannot I see the same output as seen in terminal terminal 1? Why the path... (4 Replies)
Discussion started by: rupeshkp728
4 Replies
Path::Dispatcher::Rule::Under(3pm)			User Contributed Perl Documentation			Path::Dispatcher::Rule::Under(3pm)

NAME
Path::Dispatcher::Rule::Under - rules under a predicate SYNOPSIS
my $ticket = Path::Dispatcher::Rule::Tokens->new( tokens => [ 'ticket' ], prefix => 1, ); my $create = Path::Dispatcher::Rule::Tokens->new( tokens => [ 'create' ], block => sub { create_ticket() }, ); my $delete = Path::Dispatcher::Rule::Tokens->new( tokens => [ 'delete', qr/^d+$/ ], block => sub { delete_ticket(shift->pos(2)) }, ); my $rule = Path::Dispatcher::Rule::Under->new( predicate => $ticket, rules => [ $create, $delete ], ); $rule->match("ticket create"); $rule->match("ticket delete 3"); DESCRIPTION
Rules of this class have two-phase matching: if the predicate is matched, then the contained rules are matched. The benefit of this is less repetition of the predicate, both in terms of code and in matching it. ATTRIBUTES
predicate A rule (which must match prefixes) whose match determines whether the contained rules are considered. The leftover path of the predicate is used as the path for the contained rules. rules A list of rules that will be try to be matched only if the predicate is matched. perl v5.12.4 2011-08-30 Path::Dispatcher::Rule::Under(3pm)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy