Hello All,
I have a script that will email out if the email address is specified as parameter 1.
I am using ksh, and then tried the following :
email=$1
Following did not work, I am getting error
test -z $email
test ${email:=" ") -eq " "
test -n $email
test ${?email}
What... (4 Replies)
Hi
I am writing a bash script and would like to check is a variable contains a . or not
ex.
a=102 output ok
a=1.02 output not ok
Many thanks, (3 Replies)
Hi all,
to check that a variable is not empty, I usually do:
if ; then...
or
if ; then...
what if I have a serie of variables and want to do the same test on all of them. How to do this in a single if statement?
thank you (1 Reply)
hi to all,
i want to check the value of a variable that it contains characters.
for example i try the following:
if then .........
i just want to check that in the specific line that is a variable called "passline" has the entry "password". But it can contain also other characters in the... (4 Replies)
I have seen many posts for this sort of problem but I just did not know how to use it for my issue. A number is assigned to a variable and I wanted to check if it is a zero or non zero.
Example of my numbers are below:
000000000000000000000000000000000000000000000000... (8 Replies)
#!/bin/sh
echo "Running Script to capture ORACLE Erros"
# Change Directory to the actual logs path
cd /home/nv8510/lognew
err_var=`grep -in "ORA-" *`
if then
echo "THESE ARE THE ORACLE ERROR OCCURED"
echo "$err_var"
echo... (7 Replies)
I have a script /root/asas with following contents.
#!/bin/bash
ha=`cat /etc/passwd | grep sandra`
if ; then
echo "Sandra is in /etc/passwd"
echo "variable ha is $ha"
else
echo "Sandra is NOT in /etc/passwd"
echo "variable ha is $ha"
fi
What... (3 Replies)
hi,
i want to check whether a a variable contains some value or is empty in a shell script. so if the variable contains some value i want to do some job and if the variable doesnt contain any value then i need to skip that job.
here is a sample script
read_filenames.sh contains
... (5 Replies)
Discussion started by: Little
5 Replies
LEARN ABOUT PHP
numfmt_get_symbol
NUMFMT_GET_SYMBOL(3) 1 NUMFMT_GET_SYMBOL(3)NumberFormatter::getSymbol - Get a symbol value
Object oriented style
SYNOPSIS
public string NumberFormatter::getSymbol (int $attr)
DESCRIPTION
Procedural style
string numfmt_get_symbol (NumberFormatter $fmt, int $attr)
Get a symbol associated with the formatter. The formatter uses symbols to represent the special locale-dependent characters in a number,
for example the percent sign. This API is not supported for rule-based formatters.
PARAMETERS
o $fmt
-NumberFormatter object.
o $attr
- Symbol specifier, one of the format symbol constants.
RETURN VALUES
The symbol string or FALSE on error.
EXAMPLES
Example #1
numfmt_get_symbol(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
numfmt_set_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*");
echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo $fmt->format(1234567.891234567890000)."
";
$fmt->setSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*");
echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo $fmt->format(1234567.891234567890000)."
";
?>
The above example will output:
Sep: .
1.234.567,891
Sep: *
1*234*567,891
SEE ALSO numfmt_get_error_code(3), numfmt_set_symbol(3).
PHP Documentation Group NUMFMT_GET_SYMBOL(3)