Hi Folks,
I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help..
thanks in adv.
Br///
Vijay. (1 Reply)
Hi All,
How do i modify the below script such that if the input is numeric, it will give the numeric digit, else it will ouput "0"
echo "xxx" | awk '/^+$/' (6 Replies)
if test $b -ne
then
echo "\n\n\n\tPassword reset has been done successfully"
else
echo "\n\n\n\tAn error occurred"
fi
i want to check whether $b is non-numeric so how to do that? (3 Replies)
Below is the abstract of the script which is working fine.
if ]
then
error_process "Invalid month format."
return 1
fi
I am doing validation for month and it errors if the value is > 12 or < 0. In addition, I want to add another condition to error if it... (2 Replies)
Hi,
how to check the given string is numeric or not , without converting ( using strtol...).
for ex: if string is C01 - non-numeric data
if string is 001 - numeric data
TIA (11 Replies)
Hi All,
I would like to convert my below csh script to Perl.
Can any expert help ?
# To check for numeric input
set tested1 = `echo "$tested"| awk '/^+$/'`;
# To remove un-neccessary zeros
set tested2 = `echo "$tested"|awk '{print $0+0}'`; (3 Replies)
How to check if the file contains only numeric values.
I don't want to read entire file it eats lot of cpu
Or any way which consumes less memory n cpu..
Please suggest
-S (2 Replies)
Hi,
I want to know, how we find out if a column is having a numeric value or not.
For Example if we have a csv file as
ASDF,QWER,GHJK,123,FGHY,9876
GHTY,NVHR,WOPI,623,HFBS,5386
we need to find out if the 4th and 6th column has muneric value or not.
Thanks in advance
Keerthan (9 Replies)
I checked all the previous threads related to this and tried this.
My input is all numbers or decimals greater than zero everytime.
I want to check the same in the korn shell script.
Just validate the string to be numeric.
This is what I am doing.
var="12345"
if ) -o "$var" !=... (14 Replies)
Hello there, find below for my code first:
$pdp_asaba=`cat /tmp/temp_total | grep asaba | sed 's/*//g'`
if ]]
then pdp_asaba=0
fi
$pdp_abuja=`cat /tmp/temp_total | grep abuja | sed 's/*//g'`
if ]]
then pdp_abuja=0
fi
$pdp_ojota=`cat /tmp/temp_total | grep ojota | sed 's/*//g'`
if ... (3 Replies)
Discussion started by: infinitydon
3 Replies
LEARN ABOUT PHP
imap_mailboxmsginfo
IMAP_MAILBOXMSGINFO(3) 1 IMAP_MAILBOXMSGINFO(3)imap_mailboxmsginfo - Get information about the current mailboxSYNOPSIS
object imap_mailboxmsginfo (resource $imap_stream)
DESCRIPTION
Checks the current mailbox status on the server. It is similar to imap_status(3), but will additionally sum up the size of all messages in
the mailbox, which will take some additional time to execute.
PARAMETERS
o $
imap_stream -An IMAP stream returned by imap_open(3).
RETURN VALUES
Returns the information in an object with following properties:
Mailbox properties
+--------+----------------------------------------+
| Date | |
| | |
| | date of last change (current datetime) |
| | |
|Driver | |
| | |
| | driver |
| | |
|Mailbox | |
| | |
| | name of the mailbox |
| | |
| Nmsgs | |
| | |
| | number of messages |
| | |
|Recent | |
| | |
| | number of recent messages |
| | |
|Unread | |
| | |
| | number of unread messages |
| | |
|Deleted | |
| | |
| | number of deleted messages |
| | |
| Size | |
| | |
| | mailbox size |
| | |
+--------+----------------------------------------+
Returns FALSE on failure.
EXAMPLES
Example #1
imap_mailboxmsginfo(3) example
<?php
$mbox = imap_open("{imap.example.org}INBOX", "username", "password")
or die("can't connect: " . imap_last_error());
$check = imap_mailboxmsginfo($mbox);
if ($check) {
echo "Date: " . $check->Date . "<br />
" ;
echo "Driver: " . $check->Driver . "<br />
" ;
echo "Mailbox: " . $check->Mailbox . "<br />
" ;
echo "Messages: " . $check->Nmsgs . "<br />
" ;
echo "Recent: " . $check->Recent . "<br />
" ;
echo "Unread: " . $check->Unread . "<br />
" ;
echo "Deleted: " . $check->Deleted . "<br />
" ;
echo "Size: " . $check->Size . "<br />
" ;
} else {
echo "imap_mailboxmsginfo() failed: " . imap_last_error() . "<br />
";
}
imap_close($mbox);
?>
PHP Documentation Group IMAP_MAILBOXMSGINFO(3)