10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hai
how can I assign directory path to a variable in perl
Thanks&Regards
kiran (2 Replies)
Discussion started by: kiran425
2 Replies
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. UNIX for Dummies Questions & Answers
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