Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Hi ,
I have a directory structure as dir and subdirectories and files under it and so on.now I need to find the files which contain the search string under every dir and subdir and replace .
my search string is like
searchstring=/a/b
string to be replaced=/a/c/b
please help.
... (7 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Hello.
I have five config files in /etc that I want to edit in one click for testing.
I would like to make a script like this :
#!/bin/bash
#
a_file="/etc/file_1"
src_str="src_string_1"
rpl_str="rpl_string_1"
calling_sed_or_awk_or_whatelse $a_file search_for_all $src_str replace_with... (4 Replies)
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT PHP
locale_get_display_language
LOCALE_GET_DISPLAY_LANGUAGE(3) 1 LOCALE_GET_DISPLAY_LANGUAGE(3)Locale::getDisplayLanguage - Returns an appropriately localized display name for language of the inputlocale
Object oriented style
SYNOPSIS
publicstatic string Locale::getDisplayLanguage (string $locale, [string $in_locale])
DESCRIPTION
Procedural style
string locale_get_display_language (string $locale, [string $in_locale])
Returns an appropriately localized display name for language of the input locale. If is NULL then the default locale is used.
PARAMETERS
o $locale
- The locale to return a display language for
o $in_locale
- Optional format locale to use to display the language name
RETURN VALUES
display name of the language for the $locale in the format appropriate for $in_locale.
EXAMPLES
Example #1
locale_get_display_language(3) example
<?php
echo locale_get_display_language('sl-Latn-IT-nedis', 'en');
echo ";
";
echo locale_get_display_language('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo locale_get_display_language('sl-Latn-IT-nedis', 'de');
?>
Example #2
OO example
<?php
echo Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'en');
echo ";
";
echo Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'de');
?>
The above example will output:
Slovenian;
slovxc3xa8ne;
Slowenisch
SEE ALSO locale_get_display_name(3), locale_get_display_script(3), locale_get_display_region(3), locale_get_display_variant(3).
PHP Documentation Group LOCALE_GET_DISPLAY_LANGUAGE(3)