Hi I am very new to KSH programming
and need some help with finding a string in an error log
currently i am doing
cat FTP_LOG.lis | grep Warning
which gives me
Warning: Authentication failed. Remaining authentication methods: 'publickey,pas
I want to only pick up the test between the... (4 Replies)
Hi all
suppose i have a string "abacus sabre", i need to replace occurences 'ab' with 'cd' and i need to store this result into same string and i need to return this result from script to the calling function, where as the string is passed from calling function.
i tried like this
... (1 Reply)
hi
I have the input as follows
ABC =893
JKL = "jee"
alias PQR = 9833
alias STUVE = "kuiue"
I should be able to print as follows
ABC
JKL
alias PQR
alias STUVE
Thanks
Suresh (7 Replies)
Hi,
I have a string assinged to a varaible as below.
FILE=/var/adm/message
If $FILE is the value where it stores the path of message file.
I would like to extract the location of the file message as below
LOCATION=/var/adm
FILE may have value like /var/adm/xxxx/message
... (2 Replies)
Hi there
i have a script which will create unix user accounts. Id like to validate the entered string so that it is specifically 8 characters or less and consists of only ! not
Is there a way to validate a string against a regular expression.. i.e
size=`printf "$var | wc -m`
... (1 Reply)
Hi mates,
I am doing a script in ksh. I have the following string:
/opt/one/two/four/five/myFile.txt
And I have a variable:
echo "${variable}" -> /opt/one/two/
I would like to have just the string: four/five/myFile.txt
What is the better way to do that?
Thanks in... (3 Replies)
I have a string something like "/opt/src/default.cfg" OR /opt/src/common/one
This whole string stored in an array. The problem is this string is not constant and it will keep on changing as lot of strings are stored in the array and it will be look like :-
case 1
/opt/src/default.cfg ... (8 Replies)
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Hi,
I needed to extract some specific characters from a string based on user input. For example: After the script executes the user enters the following details:
Please enter the string: This is a shell script
Please enter the starting position: 11
Please enter the number of characters to be... (4 Replies)
Discussion started by: ChandanN
4 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)