Hi,
How can I split the characters in a word?
For Eg:
If my input is:
command
my output should be:
c
o
m
m
a
n
d
Please help me in doing it so. (5 Replies)
suppose
fileA
kanika123ABC 1222222222222222
raciat5678ty 1221123333331121
jessica78ulllo 2233243223333333
so output shud be print only first 10 characters in series and rest remain same
kanika123A 1222222222222222
raciat5678 1221123333331121
jessica78u ... (1 Reply)
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Hey,
I'm trying to print the first four characters of the hostname of a computer.
I can get it from using:
hostname -s | sed 's/...........$//'"
but this is when I know how many characters are in the computer name.
I dont understand why some like:
hostname -s | sed '/..../p'
wont... (7 Replies)
Hi,
I am using Cygwin.I created a new file and type into it using cat > newfile. When I open this using vi editor, it contains loads of extra control characters.
Whats happening? (1 Reply)
Hi,
i want to use awk to print the first 6 characters of a variable
awk -F"|" '$3>0 { print $3 }' z00.unl > z001.unl
but $3= 7 digits
and i just want to print the first 6 digits.
eg 1005779 but i want to print only 100577 (3 Replies)
Hi,
I have this header on a script:
echo "*************************************"
How can I print 1000 "*" characters without to put them on the echo command? Understand?
THIS IS AN EXAMPLE WHAT I NEED:
print "1000 *"
Or is possible to print or echo "*" characters until they... (8 Replies)
Hi everyone,
I'm trying to write a shell script that process a log file. The log format is generally:
(8 digit hex of unix time),(system ID),(state)\n
My shell script gets the file from the web, saves it in a local text directory. I then want to change the hex to decimal, convert from unix time... (7 Replies)
Hello all,
I have a data like this:
X:04252 X:05524 X:04176
X:05509 X:05524 X:04674-
X:1662912 X:10181
X:16491 X:05506
X:05216- X:05488
X:46872 X:08471
X:04834 X:30170
The except result is like this:
X:04252 X:05524 X:04176
X:05509 X:05524 X:04674
X:16629 X:10181... (3 Replies)
Discussion started by: yhkoo
3 Replies
LEARN ABOUT PHP
mb_strtolower
MB_STRTOLOWER(3) 1 MB_STRTOLOWER(3)mb_strtolower - Make a string lowercaseSYNOPSIS
string mb_strtolower (string $str, [string $encoding = mb_internal_encoding()])
DESCRIPTION
Returns $str with all alphabetic characters converted to lowercase.
PARAMETERS
o $str
- The string being lowercased.
o $encoding
-The $encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used.
RETURN VALUES
$str with all alphabetic characters converted to lowercase.
UNICODE
For more information about the Unicode properties, please see http://www.unicode.org/unicode/reports/tr21/.
By contrast to strtolower(3), 'alphabetic' is determined by the Unicode character properties. Thus the behaviour of this function is not
affected by locale settings and it can convert any characters that have 'alphabetic' property, such as A-umlaut (A).
EXAMPLES
Example #1
mb_strtolower(3) example
<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = mb_strtolower($str);
echo $str; // Prints mary had a little lamb and she loved it so
?>
Example #2
mb_strtolower(3) example with non-Latin UTF-8 text
<?php
$str = "Txiotn a
nE Baos unuvn yn, dpaokeCei unp vw0po kuvs";
$str = mb_strtolower($str, 'UTF-8');
echo $str; // Prints txiotn a
nE Baos unuvn yn, dpaokeCei unp vw0po kuvs
?>
SEE ALSO mb_strtoupper(3), mb_convert_case(3), strtolower(3).
PHP Documentation Group MB_STRTOLOWER(3)