How can I use Perl to a take a string of 10 characters and print the last five characters of the string in columns 1-5 and the first five in columns 6-10?
Result:
0123456789
5 0
6 1
7 2
8 3
9 4 (5 Replies)
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,
A very Good Evening to All,
I am writing a script for my application. I have a file with 1000 lines. Among that 1000 lines i am searching for a particular string. And from that string i need to pull all the data in to a seperate file.
For example the contents of my file is as below.
... (4 Replies)
Hello Everyone,
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
In python how we need to print a same string many times without using loop.
I cane across something like * operator for this .
How we Can use this in a print statement ?
I am using python 3.x
Please help me (7 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Please help .
The script need to first grep for all lines with "C:" as it contains a value
Here the value is 0
1,00: This , is a good script c:0
and then give output of the lines with top 3 highest value for c:
1,00: This , is a nice script c:9999
1,00: This , is a... (3 Replies)
Hi,
I have a file containing many times the word "IPaddress". and i need a command that finds that string or word and print it only once. I've tried the following but they print a line for each match:
grep "IPaddress" /directory/file.xml
find . | xargs grep 'IPaddress' -sl
i have many... (2 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 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)