output to console and to logfile.

2002-09-26 Thread Peter Lemus
;; &Establish_BCV; &getdate; open (STDOUT, ">> $LOGFILE"); print "$date:Verifing the Establish is done.\n"; close(STDOUT); &Verify_BCV; &getdate; :q! = Peter Lemus Network Engineer [EMAIL PROTECTED] --A wise man will be master of his mind, a fool will be its

Re: converting a hash to an array

2002-05-29 Thread Peter Lemus
n", $sorted{1}, > > $sorted{2} > > ) ; > > '@sorted' is an array, not a hash, > $sorted{something} will not work. > > -- > felix > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL

lynx

2002-05-07 Thread Peter Lemus
Hi all. I need an example on how I can script lynx to send me an e-mail of a list of stock quotes every so often. Please let me know, thanks = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out

print stock market page every so often

2002-02-13 Thread Peter Lemus
would like to get periodic updates on my stocks. = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, besides us "humans"? --A wise man will be master of his mind, a fool will be its slave.

add text to a file.....Help

2002-01-08 Thread Peter Lemus
neweek onemonth onequarter oneyear onecentury twoday twoweek etc..etc. Pleas give me an example on how I can accomplish this. thanks in advanced. ===== Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, bes

add text to the end of a word. HELP!!

2001-12-31 Thread Peter Lemus
Hi I need to add a word to the end of a word inside a file. HELP PLEASE for example: I will read a file with these names july tony richard then I want to add the following to the name @minime.com. So it will look like [EMAIL PROTECTED] = Peter Lemus UNIX/NT Networks Engineer [EMAIL

press return to continue

2001-11-29 Thread Peter Lemus
greedings.. How can I get my script to interact with the user to press return to continue or cntl-c to stop? thanks in advance. = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, besides

HOW do I get the third column on a file.

2001-11-08 Thread Peter Lemus
vance. = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, besides us "humans"? --A wise man will be master of his mind, a fool will be its slave. Dr.David Schwartz. --Enjoy every moment o

send errors to log and screen too.

2001-10-30 Thread Peter Lemus
with production "; print ""; print ""; print ""; print ""; print ""; print ""; print ""; close STDERR; = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the r

STDERR question.

2001-10-30 Thread Peter Lemus
re logged in."; print " If all ok, continue with production "; print ""; print ""; print ""; print ""; print ""; print ""; print ""; close STDERR; = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The

what is the splicit package? how do I enable it?

2001-06-20 Thread Peter Lemus
Hi I got the message: global symbol $user requires explicit pakage name at logout.pl line 10. please give a tip to solve this problem. = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe too big for us to be alone; the question is who is out-there? --A wise man will be

use strict

2001-06-18 Thread Peter Lemus
HI, My unix system keeps saying I have a problem when I say use strict; can you not use strict on unix? Please advice. = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe too big for us to be alone; the question is who is out-there? --A wise man will be master of his

help with script

2001-05-30 Thread Peter Lemus
may clash with future reserved word at logout.pl line 17. syntax error in file logout.pl at line 19, next token "@PIDS" syntax error in file logout.pl at line 26, at EOF Execution of logout.pl aborted due to compilation errors. = Peter Lemus UNIX/NT Networks

error on system command

2001-05-25 Thread Peter Lemus
Hi, I'm getting a syntax error on the following command $PIDS=`ps -ef | grep $user | grep -v grep | cut -b 10-14` Please help. I need to get the process id of $user and assign it to PIDS, then kill it. thanks, = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --This world i

user script to logout users from unix

2001-05-23 Thread Peter Lemus
ogged out"; $PIDS =`ps -xa | grep $user | grep -v grep | cut -b -6` `kill $PIDS`; `kill -9 $PIDS`; } close USERS; close STDERR; thanks, = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --This world is too big

logout users in unix script

2001-05-23 Thread Peter Lemus
Hi, Does anybody have a sample script for loging out users in unix? I need to logout all users except root. thanks, = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --This world is too big for us to be alone. --A wise man will be master of his mind a fool will be its slave

map the same letter drive to multiple servers in a loop.

2001-05-15 Thread Peter Lemus
sys01\\cmsopen"); system ("copy *.* $path"); system ("net use f: /delete"); Also, what other option do I have for executing system commands besides using system?? I heard system is not the best way to do it. thanks, in advance, = Peter Lemus UNIX/NT Networks Engineer [

How can I get all error messages from this script, including system cmds.

2001-05-15 Thread Peter Lemus
ork drives. system ("net use s: /delete"); system ("net use t: /delete"); system ("net use u: /delete"); system ("net use v: /delete"); system ("net use w: /delete"); system ("net use x: /delete"); system ("net use y: /delete"

how to stamp the date onto a log file name.

2001-05-10 Thread Peter Lemus
Hi Guys, Please provide an example on how I can create the log file of a perl script, something like MMDD.log. I'll like to use the current Month, Day, and Year. thanks in advance, = Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] My Dad always tought me; when you do

check to see if file exists.

2001-05-10 Thread Peter Lemus
Hi, I need to check to see if a file exists in a directory, if it does then delete it, else .. is this the correct syntax? if (-e $file and -f _) { system ("del $file") ? print "File $file deleted\n" : warn "File $file WAS removed: $!\n"; = Peter Le

execute at win2k system command with options.

2001-05-02 Thread Peter Lemus
Hi, I'm having some trouble trying to execute the followin command from a perl script. rmdir /s /q username #this works from the command line in win2k. I tried: system 'rmdir /s /q $user' # no luck. Any suggestions? ===== Peter Lemus Computer Networks Engineer [EMAI

test if a directory exists if it does delete it else print directory does not exists

2001-05-01 Thread Peter Lemus
tem ('rmdir /s /q $user'); #system ('rmdir /s /q $user'); # remove directory # if (-d ) { # check if file exist: "please help me here" } print "Specified directory has been deleted \n"; sleep 2;

How to create a log file from a perl script

2001-04-26 Thread Peter Lemus
Hi All, I need to create a log from a perl script that generates a lot of errors and successful completion messages. Please give me some tips on how I can accomplish this. thanks, = Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] My Dad always tought me; when you do good

How to create a log file from a perl script

2001-04-26 Thread Peter Lemus
Hi, Guys, I'm running a perl script that generates lots of error messages and successful completion messages. Please give me some tips on how can I put all this data to a log file. thanks, = Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] My Dad always tought me; when you do

how to execute a windows 2000 command with perl

2001-04-25 Thread Peter Lemus
te machine: some thing like: system "xcacls $line /g $line:r /E \n"; # set the permissions I need to run this on the remote machine though. Regards, = Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] My Dad always tought me; when you do good; expect to receive good; when

map a network drive through a perl script

2001-04-25 Thread Peter Lemus
Hi, All I'm having some trouble mapping a network drive through my perl script. the mapping looks like this: system ("net use \\mypc\reports"); Pls let me know if this is not the correct syntax. thanks, ===== Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] My Dad a

if file does not exist create it.

2001-04-24 Thread Peter Lemus
Hi Guys, I'm writing a script that will read a file, the data on the file are directories in a win2k server. I would like to test if the folder exists and create the folder if it doesn't exist. Please give me an example of how I can accomplish this. Regards, Peter ===== Peter Lemu

how to pass on a variable to a win2k command.

2001-04-22 Thread Peter Lemus
Hi, folks, I'm trying to pass a variable to a system command, the first time it works but the second time it doesn't. the script looks like this: #!/usr/bin/perl #Editor: Peter Lemus #Purpose: to assign security to multiple files in win2k. print "Permissions are being changed now

How to read the second column of a file

2001-04-20 Thread Peter Lemus
and reassingn the next name to the same variable. thanks, = Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

how to execute a windows 2000 command with perl

2001-04-19 Thread Peter Lemus
Hi, nd help. Please let me know how I can execute a windows 2000 command from a perl script? any command like dir for example. thanks, = Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo