Sponsored Content
Top Forums Shell Programming and Scripting seperating the words from a line?? Post 302123620 by anbu23 on Tuesday 26th of June 2007 09:00:34 AM
Old 06-26-2007
Code:
str="+abc+def+mgh+ddsdsd+sa"
echo ${str#?} | tr '+' ','

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Seperating Files

I wonder if there is any method that can effectively cut a file into 2 or more files... with the title on top... like this Original File : TITLE 1 001 ABC 002 DEF 003 GHI 004 JKL into 4 file : File 1: TITLE 1 001 ABC File 2: (6 Replies)
Discussion started by: biglemon
6 Replies

2. Shell Programming and Scripting

Seperating one word into columns

Hi, Our issue is that we want to separate a string of characters, like xyxyxyxxxxyyxyxy into a column, x y x y ... I'm sure there's an easy awk fix for this, but being inexperienced, I figured I would ask on here. Thanks a lot in advance! (4 Replies)
Discussion started by: NovaGhostii
4 Replies

3. Shell Programming and Scripting

how to get line number of different words if exists in same line

I have some txt files. I have to create another text file which contains the portion starting from the format "Date Sex Address" to the end of the file. While using grep -n on Date it also gives me the previous line containg Date. and also Date may be DATE in some files. My file is like this... (10 Replies)
Discussion started by: Amiya Rath
10 Replies

4. Shell Programming and Scripting

remove first few words from a line

Hi All, Sample: 4051 Oct 4 10:03:36 AM 2008: TEST: end of testcase Checking Interface after reload, result fail I need to remove first 10 words of the above line and output should be like Checking Interface after reload, result fail Please help me in this regard. Thanks, (4 Replies)
Discussion started by: shellscripter
4 Replies

5. Shell Programming and Scripting

sort words in a line

Hi Im looking for a way, hopefully a one-liner to sort words in a line e.g "these are the words in a line" to "a are in line the these words" Thanks! (15 Replies)
Discussion started by: rebelbuttmunch
15 Replies

6. Shell Programming and Scripting

How to print the words in the same line with space or to the predefined line?

HI, cat test abc echo "def" >> test output is cat test abc def the needed output is cat test abc def and so on (5 Replies)
Discussion started by: jobycxa
5 Replies

7. Shell Programming and Scripting

Copying x words from end of line to specific location in same line

Hello all i know it is pretty hard one but you will manage it all after noticing and calculating i find a rhythm for the file i want to edit to copy the last 12 characters in line but the problem is to add after first 25 characters in same line in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies

8. Shell Programming and Scripting

get few words from same line

Hello all i tried awk , cut but i think something missing i have this line @@XYMONDCHK-V1|.acklist.|developer_instead|rendy_google_yagom|1323977582|1323979382|1323979382|1|admin|test case i want cut some words to be in new line like this... (6 Replies)
Discussion started by: mogabr
6 Replies

9. Shell Programming and Scripting

Search words in multiple file line by line

Hi All I have to search servers name say like 1000+ "unique names" line by line in child.txt files in another file that is a master file where all server present say "master.txt",if child.txt's server name matches with master files then it print yes else no with server name. (4 Replies)
Discussion started by: netdbaind
4 Replies

10. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
MB_CONVERT_CASE(3)							 1							MB_CONVERT_CASE(3)

mb_convert_case - Perform case folding on a string

SYNOPSIS
string mb_convert_case (string $str, int $mode, [string $encoding = mb_internal_encoding()]) DESCRIPTION
Performs case folding on a string, converted in the way specified by $mode. PARAMETERS
o $str - The string being converted. o $mode - The mode of the conversion. It can be one of MB_CASE_UPPER, MB_CASE_LOWER, or MB_CASE_TITLE. o $encoding -The $encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used. RETURN VALUES
A case folded version of $string converted in the way specified by $mode. UNICODE
By contrast to the standard case folding functions such as strtolower(3) and strtoupper(3), case folding is performed on the basis of 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). For more information about the Unicode properties, please see http://www.unicode.org/unicode/reports/tr21/. EXAMPLES
Example #1 mb_convert_case(3) example <?php $str = "mary had a Little lamb and she loved it so"; $str = mb_convert_case($str, MB_CASE_UPPER, "UTF-8"); echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO $str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); echo $str; // Prints Mary Had A Little Lamb And She Loved It So ?> Example #2 mb_convert_case(3) example with non-Latin UTF-8 text <?php $str = "Txiotn a nE Baos unuvn yn, dpaokeCei unp vw0po kuvs"; $str = mb_convert_case($_tr, MB_CASE_UP_ER, "UTF_8"); _ _ echo $str; // Prints TXI>TH A/TTHH BAO> YHMNH | H, /PA>KE/EI YTTP NOOPO KYN> $str = mb_convert_case($str, MB_CASE_TITLE, "U_F-8"); echo $str; // Prints Txiotn A nE Baoo Ynuvn | n, /paokeCei Ynp Nw0po Kuvo ?> SEE ALSO
mb_strtolower(3), mb_strtoupper(3), strtolower(3), strtoupper(3), ucfirst(3), ucwords(3). PHP Documentation Group MB_CONVERT_CASE(3)
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy