Sponsored Content
Full Discussion: replace space for enter
Top Forums Shell Programming and Scripting replace space for enter Post 302437313 by pludi on Wednesday 14th of July 2010 03:29:27 PM
Old 07-14-2010
You'll have to quote it correctly. Compare the output of
Code:
echo $mostrarlistado

to
Code:
echo "$mostrarlistado"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace space by _

Hi I need to know how I change the spaces by _ in folders and filder founded by find ex. find . -name "* *" -exec echo {} \; ./test space ./test space/new file.txt ./test space/new file ./test space/untitled folder ./test space/untitled folder/new fileruben ./Backup/backup/Image... (6 Replies)
Discussion started by: ruben.rodrigues
6 Replies

2. Shell Programming and Scripting

Replace space

Hai masters, If a file contains content of 2000 lines, from which i need to remove the first n characters or first n spaces from each line of the file. If suppose to remove n characters or first n spaces from a single line means, just use the command nx. But from the above scenario,... (9 Replies)
Discussion started by: ecearund
9 Replies

3. Shell Programming and Scripting

Pressing "Enter/Space bar" using Net::TELNET? in Perl

I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router. How is this done? (0 Replies)
Discussion started by: xmaverick
0 Replies

4. Shell Programming and Scripting

Replace long space to become one space?

Hi, i have the log attached. Actually i want the long space just become 1 space left like this : Rgds, (12 Replies)
Discussion started by: justbow
12 Replies

5. Shell Programming and Scripting

Replace every other space

I'd like a sed command to replace every other space in my file. File: 0 1 0 3 0 2 0 5 Want: 01 03 02 05 Does anyone have any ideas? (9 Replies)
Discussion started by: peanuts48
9 Replies

6. Programming

Replace one space with nothing

hi, d o g e v o l i want a perl command for the above string which should change to the below dog evol replace one space with nothing and two spaces with one space. Thanks, Amey (3 Replies)
Discussion started by: ameyrk
3 Replies

7. UNIX for Dummies Questions & Answers

replace %20 with space

Hi, I need torename filenames with %20 to space in a batch wise.Can anyone help me please. Need it badly Eg. English%20Brochure%20002-1 to be replace to English Brochure 002-1 Thanks a lot Please use and tags when posting code, data or logs etc. to preserve formatting... (8 Replies)
Discussion started by: umapearl
8 Replies

8. Shell Programming and Scripting

function terminating if i give input as space or no input and enter

HI i have written a script to ask input from the user. this script should promote the user for y/n input. if user enters anyother input then y/n the script promotes him again. this below code is working fine for all the cases. except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies

9. Shell Programming and Scripting

Transpose multiple rows (with a mix of space and enter) to a single column

How to change the uploaded weekly file data to the following format? New Well_Id,Old Well_Id,District,Thana,Date,Data,R.L,WellType,Lati.,Longi. BAG001,PT006,BARGUNA,AMTALI,1/2/1978,1.81,2.29,Piezometer,220825,901430 BAG001,PT006,BARGUNA,AMTALI,1/9/1978,1.87,2.29,Piezometer,220825,901430... (3 Replies)
Discussion started by: sara.nowreen
3 Replies

10. Shell Programming and Scripting

Loop logic, enter into respective IF as per enter input file name

have three big data file, however I just need to see the mentioned below one line form the all the file which has SERVER_CONNECTION Value File 1 export SERVER_CONNECTION=//dvlna002:10001/SmartServer File2 export SERVER_CONNECTION=///SmartServer File3 export... (1 Reply)
Discussion started by: Nsharma3006
1 Replies
COLLATOR_COMPARE(3)							 1						       COLLATOR_COMPARE(3)

Collator::compare - Compare two Unicode strings

	Object oriented style

SYNOPSIS
public int Collator::compare (string $str1, string $str2) DESCRIPTION
Procedural style int collator_compare (Collator $coll, string $str1, string $str2) Compare two Unicode strings according to collation rules. PARAMETERS
o $coll -Collator object. o $str1 - The first string to compare. o $str2 - The second string to compare. RETURN VALUES
Return comparison result: o 1 if $str1 is greater than $str2 ; o 0 if $str1 is equal to $str2; o -1 if $str1 is less than $str2 . On error boolean FALSE is returned. Warning This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on Booleans for more information. Use the === operator for testing the return value of this function. EXAMPLES
Example #1 collator_compare(3)example <?php $s1 = 'Hello'; $s2 = 'hello'; $coll = collator_create( 'en_US' ); $res = collator_compare( $coll, $s1, $s2 ); if ($res === false) { echo collator_get_error_message( $coll ); } else if( $res > 0 ) { echo "s1 is greater than s2 "; } else if( $res < 0 ) { echo "s1 is less than s2 "; } else { echo "s1 is equal to s2 "; } ?> The above example will output: SEE ALSO
collator_sort(3). PHP Documentation Group COLLATOR_COMPARE(3)
All times are GMT -4. The time now is 02:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy