Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How can i assign directory path to a variable in perl? Post 302848491 by kiran425 on Thursday 29th of August 2013 12:24:26 PM
Old 08-29-2013
no
here I don't have directory path actually but I have argument like

ex: system("sh abc.sh $Calibre_Output") Calibre_Output have the directory path
Thanks
kiran
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to assign a path to a variable

Hi, good morning... I would like to know, how to assign a path to a variable and how to retrieve the same for eg to assign a= "/data/logs/xxx/yyyy" to retrieve $a is this correct??? pls rectify (2 Replies)
Discussion started by: vasikaran
2 Replies

2. Shell Programming and Scripting

assign zip directory to variable

I'm running an sh shell that is unzipping some zip files that have a directory structure on them. Is there a way I can find the top level directory in the zip file and assign that to a variable? mike (5 Replies)
Discussion started by: skwyer
5 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

Variable directory name in path

I need to write a login script for multiple computers, however, one of the directories in question will have a different name from computer to computer. ~/Library/Application\ Support/Firefox/Profiles/<unique filename>.default/myfile For the directory named <unique filename>.default , I... (2 Replies)
Discussion started by: glev2005
2 Replies

5. Shell Programming and Scripting

Perl directory path in array

Hi anyone can help how put the directory in array in perl.eg directory paths below:- /home/user/ /home/admin/ /var/log/ IF path eq /home/user/ then the files moved to /data/user/ IF path eq /var/log/ then the files moved to /data/log/ Thanks (1 Reply)
Discussion started by: netxus
1 Replies

6. Shell Programming and Scripting

Perl:Read single value from text file and assign to variable

Hello All, A part of my very basic perl code requires me to read a single value from a text file. The file output is the following: Reading image ... done IMAGEREGION=0x0x0-256x162x256 VOXELDIMENSION=0.9375000000x1.2000000477x0.9375000000 VOXELNUMBER=10527001... (7 Replies)
Discussion started by: ncl
7 Replies

7. Shell Programming and Scripting

Assign perl output to ksh shell variable

Hello, I am writing a ksh script on an AIX system. I need to get the date and time from a file into a variable. I found the following perl script from another post on this site and modified it slightly to output the format I need: perl -e '@d=localtime ((stat(shift)));... (4 Replies)
Discussion started by: swimp
4 Replies

8. Shell Programming and Scripting

Custom directory path variable

I'm trying to write my first shell script and got a bit stuck with this: I've got myscript.sh that executes from /fromhere. If the script is run with the syntax ./myscript.sh tothere: I need to make a variable inside the script containing /fromhere/tothere ...and if the script is run with... (10 Replies)
Discussion started by: Chronomaly
10 Replies

9. Shell Programming and Scripting

Perl help - how to assign output of perl to variable

Hi, guys, i have a script i inherited from a coworker but i'm not perl savy. The script works but i would like it to work better. I want to run this command ./ciscomgrtest.pl -r "show version" -h hosts.router and have the script goto each router in the hosts.router file and run the command... (2 Replies)
Discussion started by: whipuras
2 Replies

10. UNIX for Advanced & Expert Users

How can i assign directory path to a variable in perl?

Hai how can I assign directory path to a variable in perl Thanks&Regards kiran (3 Replies)
Discussion started by: kiran425
3 Replies
chroot(2)							System Calls Manual							 chroot(2)

NAME
chroot() - change root directory SYNOPSIS
DESCRIPTION
causes the named directory to become the root directory, the starting point for path searches for path names beginning with path points to a path name naming a directory. The user's working directory is unaffected by the system call. The entry in the root directory is interpreted to mean the root directory itself. Thus, cannot be used to access files outside the subtree rooted at the root directory. Security Restrictions The effective user ID of the process must be a user with the privilege to change the root directory. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
fails and the root directory remains unchanged if one or more of the following is true: Any component of the path name is not a directory. The named directory does not exist or a component of the path does not exist. The effective user ID is not a user who has the privilege. path points outside the allocated address space of the process. The reliable detection of this error is implementation dependent. The length of the specified path name exceeds bytes, or the length of a component of the path name exceeds bytes while is in effect. Too many symbolic links were encountered in translating the path name. WARNINGS
Obsolescent Interfaces is to be obsoleted at a future date. SEE ALSO
chroot(1M), chdir(2), privileges(5). STANDARDS CONFORMANCE
TO BE OBSOLETED chroot(2)
All times are GMT -4. The time now is 01:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy