Sponsored Content
Top Forums Shell Programming and Scripting Unable to set PATH through ksh shell Post 302766359 by Corona688 on Monday 4th of February 2013 03:44:32 PM
Old 02-04-2013
PATH is inherited by child processes from parent processes. Any processes you create after setting that path will get it.

Nothing else will. It doesn't propagate.

What exactly are you doing that does not work?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Set Path variable in c shell

I set my path environment variable in c shell, using the syntax below setenv PATH "${PATH}:/usr/local:/usr/local/bin" and placed this in $HOME/.login $HOME/.cshrc and /etc/.login /etc/.cshrc but when I issued echo $PATH or set command the output does not reflect changes made to... (5 Replies)
Discussion started by: hassan2
5 Replies

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

3. Solaris

Not Able to Set the path

Hi, I want to set the path for my application so I am setting the path as below -- PATH=${PATH}:.:/envs/mldev/tools:/envs/mldev/common/tools:${HOME}:/bin/p4v:/usr/j2se:/usr/j2se/bin:/usr/j2se/lib or PATH="\ /usr/bin:\ /usr/sbin:\ /usr/dt/bin:\ ... (7 Replies)
Discussion started by: smartgupta
7 Replies

4. Fedora

set path using a shell program

Hello sir, I am using a fedora 9 system. I wanted to update the path to include the $HOME into the path. So what we do is : This will update the path. I want to do the same thing by writing it in a shell prgram. I wrote the above code in an "a.sh" file and executed it using "bash a.sh".BUt... (1 Reply)
Discussion started by: nsharath
1 Replies

5. Shell Programming and Scripting

How to set PATH using shell script [resolved]

Hi, Can anyone help me on how to set PATH using shell scripting.. Please find the shell script code here.... #!/bin/bash PATH = $PATH:/opt/app/oracle/product/10.2.0/bin export PATH echo $PATH exit When i execute this script i get the following error ./backup.sh: line 2: PATH:... (0 Replies)
Discussion started by: srinivasj
0 Replies

6. Solaris

Solaris 9 -- unable to set permanent PATH

Hi, I've read forums far and wide trying to learn how to append to my PATH in Solaris 9 and every time I think I am close I discover my system is not configured the same. Its so frustrating because this all stems from a new server I am trying to setup identical to the production machine. (Of... (5 Replies)
Discussion started by: thoraddict
5 Replies

7. UNIX for Dummies Questions & Answers

Unable to convert date into no. using date -d +%s syntax in ksh shell

hi friends, I m trying to write a script which compares to dates. for this i am converting dates into no using synatx as below v2=`date | awk '{print $2,$3,$4}'` v3=`date +%s -d "$v2"` this syntax is working in bash shell ,but fails in ksh shell. please suggest on this. (12 Replies)
Discussion started by: Jcpratap
12 Replies

8. Shell Programming and Scripting

Unable to set my PATH variable

Hello All, Hope you can understand my problem from the below code. $ cat ~/.profile PS1=`whoami`@`hostname`':$PWD $ ' export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:" $ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin: $ echo $SHELL /usr/bin/ksh ... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies

9. Shell Programming and Scripting

ksh - variable to be set to windows path issue

Greetings Experts, I need to pass a parameter to ksh and the value is windows path eg: sh abc.txt C:\Users\chill3chee\Desktop No matter I try with \ delimiter, still could not get this exact value assigned to the shell variable which was checked with echo. Tried with using... (2 Replies)
Discussion started by: chill3chee
2 Replies

10. Shell Programming and Scripting

Unable to replace string in AIX ksh shell

My variable contains the following string I wish to replace \n with "space" so the expected output is: I understand that the /n is not a new linein this case. I'm on AIX using ksh shell. Below is all that I tried. echo $str | sed -e "s#\n# #g"; echo $str | sed -e "s#\n#' '#g";... (5 Replies)
Discussion started by: mohtashims
5 Replies
FORK(2) 							System Calls Manual							   FORK(2)

NAME
fork, rfork - manipulate process resources SYNOPSIS
#include <u.h> #include <libc.h> int fork(void) int rfork(int flags) DESCRIPTION
Forking is the only way new processes are created. The flags argument to rfork selects which resources of the invoking process (parent) are shared by the new process (child) or initialized to their default values. The resources include the file name space, the open file descriptor table (which, when shared, permits processes to open and close files for other processes), the set of environment variables (see env(3)), the note group (the set of processes that receive notes written to a member's notepg file; see proc(3)), and open files. Flags is the logical OR of some subset of RFPROC If set a new process is created; otherwise changes affect the current process. RFNOWAIT If set, the child process will be dissociated from the parent. Upon exit the child will leave no Waitmsg (see wait(2)) for the par- ent to collect. RFNAMEG If set, the new process inherits a copy of the parent's name space; otherwise the new process shares the parent's name space. The tag space for rendezvous(2) is considered part of the name space. Is mutually exclusive with RFCNAMEG. RFCNAMEG If set, the new process starts with a clean name space. A new name space must be built from a mount of an open file descriptor. Is mutually exclusive with RFNAMEG. RFENVG If set, the environment variables are copied; otherwise the two processes share environment variables. Is mutually exclusive with RFCENVG. RFCENVG If set, the new process starts with an empty environment. Is mutually exclusive with RFENVG. RFNOTEG Each process is a member of a group of processes that all receive notes when a note is written to any of their notepg files (see proc(3)). The group of a new process is by default the same as its parent, but if RFNOTEG is set (regardless of RFPROC), the process becomes the first in a new group, isolated from previous processes. RFFDG If set, the invoker's file descriptor table (see intro(2)) is copied; otherwise the two processes share a single table. RFCFDG If set, the new process starts with a clean file descriptor table. Is mutually exclusive with RFFDG. RFMEM If set, the kernel will mark segments of type data and bss as shared. The child will then inherit all the shared segments the parent process owns. Other segment types will be unaffected. Subsequent forks by the parent will then propagate the shared data and bss between children. The stack segment is always split. May be set only with RFPROC. File descriptors in a shared file descriptor table are kept open until either they are explicitly closed or all processes sharing the table exit. If RFPROC is set, the value returned in the parent process is the process id of the child process; the value returned in the child is zero. Without RFPROC, the return value is zero. Process ids range from 1 to the maximum integer (int) value. Rfork will sleep, if necessary, until required process resources are available. Fork is just a call of rfork(RFFDG|RFPROC). SOURCE
/sys/src/libc/9syscall /sys/src/libc/9sys/fork.c SEE ALSO
intro(2), proc(3), DIAGNOSTICS
These functions set errstr. FORK(2)
All times are GMT -4. The time now is 03:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy