Sponsored Content
Top Forums UNIX for Advanced & Expert Users How can i assign directory path to a variable in perl? Post 302848479 by kiran425 on Thursday 29th of August 2013 11:59:42 AM
Old 08-29-2013
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
 

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 Dummies Questions & Answers

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 (2 Replies)
Discussion started by: kiran425
2 Replies
LFC_CHDIR(3)						       LFC Library Functions						      LFC_CHDIR(3)

NAME
lfc_chdir - change LFC current directory used by the name server SYNOPSIS
#include <sys/types.h> #include "lfc_api.h" int lfc_chdir (const char *path) DESCRIPTION
lfc_chdir changes the LFC current directory used by the name server to expand LFC pathnames not beginning with /. This current working directory is stored in a thread-safe variable in the client. path specifies the logical pathname relative to the current LFC directory or the full LFC pathname. RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately. ERRORS
ENOENT The named directory does not exist or is a null pathname. EACCES Search permission is denied on any component of path. EFAULT path is a NULL pointer. ENOTDIR A component of path prefix is not a directory. ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN. SENOSHOST Host unknown. SENOSSERV Service unknown. SECOMERR Communication error. ENSNACT Name server is not running or is being shutdown. SEE ALSO
Castor_limits(4) AUTHOR
LCG Grid Deployment Team LFC
$Date: 2001/10/04 12:12:42 $ LFC_CHDIR(3)
All times are GMT -4. The time now is 06:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy