10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
I need a script that should print 'yes' if the argument is a valid shell variable name else 'No' if it is not a valid shell variable. A valid one begins with an alphabet or percentage (%) character and is followed by zero or more alphanumberic or percentage (%) characters.
For example:
$... (6 Replies)
Discussion started by: pingiliarjun
6 Replies
3. 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
4. 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
5. Shell Programming and Scripting
I have a variable $max = -3;
It can be $max = +3;
I need to check if this variable is a positive/negative value.
if its positive, should print "positive" if not "negative"
How can this be done?
Thanks in advance (2 Replies)
Discussion started by: irudayaraj
2 Replies
6. 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
7. Shell Programming and Scripting
#!/usr/local/bin/perl
#$path = perl;
#use File::stat;
use Time::localtime;
sub ExampleFiles{
$today = time;
$today -= $today % 86400;
$return_value = 0;
$mtime = (stat("$_")) || die "cannot stat file $!";
$size = (stat("$_")); # size in... (3 Replies)
Discussion started by: ellechim
3 Replies
8. 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
9. Shell Programming and Scripting
Logic of code
if ( $var is a number ) {
Do something
}
else {
Do something else
}
My question is: How do I check if a variable is a number. All the reg ex that I came up with to match this is failing. Please help. (3 Replies)
Discussion started by: garric
3 Replies
10. Shell Programming and Scripting
I want to check to see if a variable is set - and if not set it to something
ie. variable name test
I want to check if $test is set
then if there is nothing set against this currently - then set it to 0
Whats the best / shortest way of doing this in a script? (3 Replies)
Discussion started by: frustrated1
3 Replies