07-23-2010
well, if it works it's correct.
have you tried it?
At least do some of your homework yourself.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello,
I have to check the free space on the disk that would work both on Windows and Unix platform e.g on C: \ for Windows and / on Unix. I could use Unix command 'df ' ( my windows system has Unix emulator cygwin and could run 'df ' as well).
But I'd like not to rely on system command but... (1 Reply)
Discussion started by: susja
1 Replies
2. Shell Programming and Scripting
Hi guys, i am new to perl. I started reading the perl documents and try to come up with some logic.
I am trying to create a script that would go into a location, search for todays files, then searches for all .txt files from today.
If todays not found, its an error
If file size is less... (26 Replies)
Discussion started by: DallasT
26 Replies
3. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
4. Shell Programming and Scripting
I am working on a perl script that is used to update a list of hosts to a certain file but I am having an issue when I try to perform a check to make sure the user enters valid information. The following is what I have currently written for the script:
IPINPUT:
print "Enter IP Address: ";... (2 Replies)
Discussion started by: Takau
2 Replies
5. Shell Programming and Scripting
The following script does pull the sender and Subject of the email but it is not seeing the attachment name. I know there is an attachment.
I line in red SHOULD pull the filename out.
this line is in the message:
Content-Disposition: attachment; filename="Picture 243.jpg"
... (1 Reply)
Discussion started by: Ikon
1 Replies
6. Shell Programming and Scripting
I am trying to read the /etc/security/limits.conf file to match with my specifications.
Specification should match below :
nofile=131072
noproc=131072
memlock=3500000
I have written a perl script to read the file:
#!/usr/bin/perl
$FILE1 = "/home/sriram/perl_scripts/limits.conf";... (2 Replies)
Discussion started by: sriram003
2 Replies
7. Shell Programming and Scripting
Hi Folks,
I have few mailids in a text file and need to check whether the mailid is in correct format or not.
If just to check whether the string is a mailid or not there is a perl module Email::Valid to do the business or we can implement our own logic.
But the mail_ids I am having is... (4 Replies)
Discussion started by: giridhar276
4 Replies
8. Shell Programming and Scripting
I'm a scripting newbie and I'm trying to learn. No better way than being assigned a project.
So basically, I'm trying to come up with a script that can periodically check a URL and then notify when changes occur to the file.
So what I'm thinking is that I need to devise a PERL script that... (3 Replies)
Discussion started by: adam1mc
3 Replies
9. Shell Programming and Scripting
Hello,
I need to chack if the printer is out of paper, and send message to operator.
I need to do this from perl script.
The printer have mechanism to check if it have paper. However, the cups does not report "printer out of paper" when I remove the paper, and try to print.
Is there any... (1 Reply)
Discussion started by: +Yan
1 Replies
10. Shell Programming and Scripting
Hi,
I am trying to write a script for following scenario:
I have a list of countries from where I receive files...eg. (Indonesia, Thailand, Australia...etc)
For each country, I have a list of files that they send.
IND -- a,b,c
TH -- p,q,r
AU -- x,y,z
The path for these files could... (2 Replies)
Discussion started by: neil.k
2 Replies
LEARN ABOUT REDHAT
time::localtime
Time::localtime(3pm) Perl Programmers Reference Guide Time::localtime(3pm)
NAME
Time::localtime - by-name interface to Perl's built-in localtime() function
SYNOPSIS
use Time::localtime;
printf "Year is %d
", localtime->year() + 1900;
$now = ctime();
use Time::localtime;
use File::stat;
$date_string = ctime(stat($file)->mtime);
DESCRIPTION
This module's default exports override the core localtime() function, replacing it with a version that returns "Time::tm" objects. This
object has methods that return the similarly named structure field name from the C's tm structure from time.h; namely sec, min, hour, mday,
mon, year, wday, yday, and isdst.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that
this still overrides your core functions.) Access these fields as variables named with a preceding "tm_" in front their method names.
Thus, "$tm_obj->mday()" corresponds to $tm_mday if you import the fields.
The ctime() function provides a way of getting at the scalar sense of the original CORE::localtime() function.
To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their
full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package.
NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.
AUTHOR
Tom Christiansen
perl v5.8.0 2002-06-01 Time::localtime(3pm)