Search Results

Search: Posts Made By: mh53j_fe
2,475
Posted By mh53j_fe
Need Help with Perl REGEXP
I need help with a Perl regular expression.
The following string blows up my program: <david(greg jim)>
If I type this string, there is no problem: <david(greg_jim)> or type
david(gregjim) or type...
6,038
Posted By mh53j_fe
Perl DBI - Bind Parameters Problem
I have a SQL statement that includes a UNION that I can't get to work when I bind the parameters. (I am binding the parameters to prevent SQL injection.)
Does anybody have any suggestion on how I...
16,230
Posted By mh53j_fe
The following code snippet runs a SQL file that...
The following code snippet runs a SQL file that will execute a stored procedure. The three $DB_* variables are the Oracle ID, password, and server variables. I hope this helps.


sqlplus -s <<EOF...
3,295
Posted By mh53j_fe
ls -s | sort -nr | head -1
ls -s | sort -nr | head -1
7,304
Posted By mh53j_fe
Response to reggie
Reggie,

Sorry, but that is not the problem. The problem is that the regular expression is not seeing the forward slash (/).

For example, the following string should evaluate to 'good data'.
...
7,304
Posted By mh53j_fe
Perl Regular Expression - Whitelist
I am creating a whitelist for User Input Validation. Here is a code snippet that allows alphanumeric and forward slash (/).
if ( $variable =~ /^[a-zA-Z0-9\/]*$/ ) #allow alphanumeric and fwd...
2,378
Posted By mh53j_fe
Thanks Ygor
Your recommendation worked!. Thanks for your help.

Regards,
Dave
2,378
Posted By mh53j_fe
Perl Regular Expression - Whitlist
I am trying to create a whitelist like the following:
##the only allowable characters are a-z, A-Z, 0-9, -, / , .
$var1 = 'abc~!<0384765';
$var2 = 'abc123-/.ABR';

if ( $var1 (contains only...
6,353
Posted By mh53j_fe
SendMail in Perl
I am writing a web program that uses SendMail. Here is a snippet of the code:
open(SENDMAIL, "| /usr/lib/sendmail -t")
print SENDMAIL <<EMAIL_MESSAGE;
From: $FROM; ...
7,001
Posted By mh53j_fe
Reply to Perderabo
I look through the entire contents of the faq section in "advanced/complex uses of the find command".

I did not find any reference how I can retrieve only those files in a directory that are older...
7,001
Posted By mh53j_fe
Finding only those files older than 2 hours
I need to write a program that will only remove those files that are older than 2 hours.

Is there some variation of
find . -mtime ? -name '[A-Z]*'
that I can use?

Thanks as always for your...
6,722
Posted By mh53j_fe
Disk Space Usage
I use this:
UsedSpace=`df -k . | awk '{print $5 }'| tail -1 | cut -d"%" -f1`

if [$UsedSpace -ge 90 ]
select the files that you want to remove
rm -f selected files
fi
8,052
Posted By mh53j_fe
Thanks to all that have responded
I am going to use system to call my shell script. Thank you for your help.
8,052
Posted By mh53j_fe
Correct Syntax For Calling Shell Script in Perl Module
Problem: I have a shell script that will be called by a Perl module that will connect to a db and delete rows. The Perl module will be called by CRON. I am using a Perl module to call a shell script...
17,674
Posted By mh53j_fe
Convert block size to mb
If I execute this command:
$ ls -lt | awk '{print $5}' | sort -nr |head -1

it returns the following value
57441881

If I execute this command:
$ ls -s | sort -nr |...
7,553
Posted By mh53j_fe
Thank you jerardfjay!!!!
I do use the vi editor, and when i turned on set list, Voila!
I took out all the white spaces wrapped around the sql statements and the script ran fine.

Thanks to you and all the others that have...
7,553
Posted By mh53j_fe
Correction - here is what I am trying to do
When our end-users run reports, we save a copy of the report on our web server and to a db table. I want to create a shell script that is executed by CRON to occasionally clean out reports and free...
7,553
Posted By mh53j_fe
Here is what I am trying to do
When our end-users run reports, we save a copy of the report on our web server. I want to create a shell script that is executed by CRON to occasionally clean out reports and free up disk space....
7,553
Posted By mh53j_fe
Answer to value in variable $UsedSpace
The value of this variable is 80. I have tried all suggestions, but I am still getting a syntax error.

test.sh: syntax error at line 34: `end of file' unexpected

Line 34 goes beyond the last...
7,553
Posted By mh53j_fe
Thanks but I am still getting syntax errors
I have replace "start" with "@". I am still getting syntax errors. Is there anybody else that can help me?
7,553
Posted By mh53j_fe
Problems executing SQL Plus sessions
If I execute this script:

$ORACLE_HOME/bin/sqlplus -s <<EOF > oracle.log
$DB_id/$DB_pswd@$DB_server
start test.sql ...
12,806
Posted By mh53j_fe
Execute an Oracle stored procedure from a shell scrip
Here is a snippet of my code:
if [ $FileName != $File ]
then
echo "\n Deleting...
4,835
Posted By mh53j_fe
Removing characters from a string
I need help to strip out the first two characters of the variable $FileName. Please help.

FileName=`find . -mtime +0 -name '[A-Z]*'`

Contents of variable $FileName:...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 11:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy