12-14-2005
That works, thanks.
I was trying to figure out how to do it with $ARGV[0] by passing an argument to the perl command.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Is there any way to use UNIX and Perl to automate sending e-mail. I got a dynamic changing file that send out to people in my mailing list and want to experinment to see if Perl and UNIX can send it out for me when the content is change. I found a Perl source code but dont really know how to... (4 Replies)
Discussion started by: jy2728
4 Replies
2. Shell Programming and Scripting
hi..
I am new to perl and have just downloaded the whole perl man directory in html (so I am a little serious about learining how to use it.. ) the only problem is I am hardly getting anything edge wise so far.. except for some basic file scripting.. what I would like to know is how would you use... (2 Replies)
Discussion started by: moxxx68
2 Replies
3. Shell Programming and Scripting
Hi,
My perl script takes few switches which i'm parsing through GetOpt::Long module.
My script looks like something :
myscript.pl --file="foo" --or --file="bar"
The --file switch takes 2 arguments foo and bar.
The 2 values of file are separated by --or switch. I want to ensure that... (1 Reply)
Discussion started by: obelix
1 Replies
4. Shell Programming and Scripting
I had posted previously about this problem I had.
I have multiple text files with hundreds of lines of the following type:
2000001 34 54 234 2000001
32 545 2000001 -2000001 77 2000001 44 2000001 998 2000001
77 32 2000001 45 23 111 89
98 75 23 34 999
.
.
.
etc...
What I wanted was... (2 Replies)
Discussion started by: xchen89x
2 Replies
5. Shell Programming and Scripting
Hi all,
I want to get options from command line by perl.
usage()
options:
-h Show this help message and exit
-t Name of tester
--timeout Set the timeout
-l ... (1 Reply)
Discussion started by: Damon_Qu
1 Replies
6. Shell Programming and Scripting
Hi,
I use find command to list all the files in a directory and its sub-directories, but the problem is to exclude certain directories during search. Can i give the directory names in command line to skip them and search rest of the directories?
For example i have directories:
test
../test1... (1 Reply)
Discussion started by: nmattam
1 Replies
7. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
8. Shell Programming and Scripting
how do i check if a command line argument is -g?
for example,
if command line argument equals "-g"
{
print "Goodbye \n";
}
else
{
print "Welcome to the program! \n";
} (1 Reply)
Discussion started by: bshell_1214
1 Replies
9. Shell Programming and Scripting
Hi
I need to write a Perl script that the file given as first argument of the command line that will find all occurrences of the string given as the third argument of the command line and replace with the string given as the fourth argument. Name newfound file is specified as the second... (3 Replies)
Discussion started by: nekoj
3 Replies
10. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies