hello, i am a newbie who is just starting to use liunx, and I need to accept a string from the terminal and use case to echo a suitable message if the string doesn't have at least 10 characters. Also, how would I do the same thing using expr? (3 Replies)
Hi,
I was going through a file containing hundreds of lines of codes having conditional statement written as:
log()
{
echo $@
}
num=$(/usr/bin/rsh <one_machine> -l root 'ls -d /home/user/db* 2> /dev/null' | wc -w)
(( num > 0 )) && log "db info:"
so,if here the return value(stored in... (2 Replies)
I am learning Unix for the first time. I am playing around with my default profile file to add some script in the KSH. The time format is GMT and I am in eastern time zone. I am trying to script some greetings based upon the time of day using the IF/ELIF conditions. I am getting errors. I have... (2 Replies)
Below is my shell script. I am trying to execute two different BTEQ scripts depending on the day of the week. So on a saturday I will execute a certain BTEQ script and on other weekdays I will run the other script.
#!/bin/ksh
dt=`date +"%a"`
if then
bteq > final_output <<- EOF
.run... (3 Replies)
I need a shell script that will monitor a few conditions and not execute until the these conditions are met. The problem I'm having is that I can not perform a database snapshot (backup) of a sybaseIQ database unless the CPU Status Idle % is above 60% or the snapshot (backup) fails.
If... (2 Replies)
Hi,
I want to perform a conditional search and remove my search string.
Input string: "abcdaabcadgfaarstab"
Character to search: "a"
Condition: Remove all "a" in the input string except if it is "aa"
Output string: "bcdaabcdgfaarstb"
Can you please help me in this? (5 Replies)
I have a unix shell script Test.sh
more Test.sh
echo "Calling dbquery1.sh...."
./dbquery1.sh
echo "Calling dbquery2.sh...."
./dbquery2.sh
more dbquery1.sh
sqlplus -s user1/password1@DB_SID @/tmp/storedprocedures/Hello.rcp
I run Test.sh
However, I do not want dbquery2.sh to be... (3 Replies)
Hi, currently I have a script with conditional checking. But it's not flexible to use, because i must create a more conditional script if there are more keyword (see table) required. Question is: Can I create a more smarter script that will be more flexible?
I appreciate any help anyone can give... (8 Replies)
Hi,
I'm looking at doing a cron job for a script that could take a very short time to complete or a very long time to complete based on variable activity on a server. I don't want to do a weird schedule, but I don't want to be so aggressive that the process attempts to start before another... (14 Replies)
Hello.
I am new this site as well as new to shell scripting and this is my first form... Please help me with the following shell script.
I am executing a shell script to run every 15 min (scheduled in cronjob) and it gives an output in an output file which is e-mailed.
CONCCOUNT=`cat... (1 Reply)
Discussion started by: Jamessteevens
1 Replies
LEARN ABOUT PHP
locale_get_display_region
LOCALE_GET_DISPLAY_REGION(3) 1 LOCALE_GET_DISPLAY_REGION(3)Locale::getDisplayRegion - Returns an appropriately localized display name for region of the input locale
Object oriented style
SYNOPSIS
publicstatic string Locale::getDisplayRegion (string $locale, [string $in_locale])
DESCRIPTION
Procedural style
string locale_get_display_region (string $locale, [string $in_locale])
Returns an appropriately localized display name for region of the input locale. If is NULL then the default locale is used.
PARAMETERS
o $locale
- The locale to return a display region for.
o $in_locale
- Optional format locale to use to display the region name
RETURN VALUES
display name of the region for the $locale in the format appropriate for $in_locale.
EXAMPLES
Example #1
locale_get_display_region(3) example
<?php
echo locale_get_display_region('sl-Latn-IT-nedis', 'en');
echo ";
";
echo locale_get_display_region('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo locale_get_display_region('sl-Latn-IT-nedis', 'de');
?>
Example #2
OO example
<?php
echo Locale::getDisplayRegion('sl-Latn-IT-nedis', 'en');
echo ";
";
echo Locale::getDisplayRegion('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo Locale::getDisplayRegion('sl-Latn-IT-nedis', 'de');
?>
The above example will output:
Italy;
Italie;
Italien
SEE ALSO locale_get_display_name(3), locale_get_display_language(3), locale_get_display_script(3), locale_get_display_variant(3).
PHP Documentation Group LOCALE_GET_DISPLAY_REGION(3)