Hi there
I have a data file like so below
'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0';'1.58';'0';'0';'0';'0';'0';'0';'clientes\resumen\200405\resumen_T100002_T100002_1.pdf';'';'0001';'S';'20040501';'';'02';'0';'S';'N'... (3 Replies)
Hi
I have a shell script with many lines as below:
comment on column dcases.proj_seq_num is dcases_1sq;
....
....
I want the above script to be as below:
comment on column dcases.proj_seq_num is 'dcases_1sq';
I want to have single quotes like that as above for the entire shell... (2 Replies)
Hi,
I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file:
Name = "abc"
The regex I'm using to match the same is:
egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
How do you print out a single quote character in AWK? Using the escape character does not seem to work.
{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " \' ", "THIS" }
does not work. Any suggestions? (6 Replies)
Hi I want to replace single quote with two single quotes in a perl string.
If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
hi all,
i have a data in the file which of the formate :
100,102,103
and the required formate is
\'100\',\'102\',\'103
Idealy we need to replace , with \',\'
Regards
arkesh (2 Replies)
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Hello,
I'd like to print line if column 5th doesn't match with exm. But to reach there I have to make sure I match single quote.
I'm struggling to match that.
I've input file like:
Warning: Variants 'exm480340' and '5:137534453:G:C' have the same position.
Warning: Variants 'exm480345'... (9 Replies)
Hi all...
(This is Don's domain.)
I have come across an anomaly in sh and dash compared to bash.
It involves echoing a character set to a file in sh and dash compared to bash.
It is probably easier to show the code and results first.
#!/usr/local/bin/dash
#!/bin/sh
#!/bin/bash
echo... (4 Replies)
Discussion started by: wisecracker
4 Replies
LEARN ABOUT PHP
wordwrap
WORDWRAP(3) 1 WORDWRAP(3)wordwrap - Wraps a string to a given number of charactersSYNOPSIS
string wordwrap (string $str, [int $width = 75], [string $break = "0], [bool $cut = false])
DESCRIPTION
Wraps a string to a given number of characters using a string break character.
PARAMETERS
o $str
- The input string.
o $width
- The number of characters at which the string will be wrapped.
o $break
- The line is broken using the optional $break parameter.
o $cut
- If the $cut is set to TRUE, the string is always wrapped at or before the specified $width. So if you have a word that is larger
than the given width, it is broken apart. (See second example). When FALSE the function does not split the word even if the $width
is smaller than the word width.
RETURN VALUES
Returns the given string wrapped at the specified length.
EXAMPLES
Example #1
wordwrap(3) example
<?php
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap($text, 20, "<br />
");
echo $newtext;
?>
The above example will output:
The quick brown fox<br />
jumped over the lazy<br />
dog.
Example #2
wordwrap(3) example
<?php
$text = "A very long woooooooooooord.";
$newtext = wordwrap($text, 8, "
", true);
echo "$newtext
";
?>
The above example will output:
A very
long
wooooooo
ooooord.
Example #3
wordwrap(3) example
<?php
$text = "A very long woooooooooooooooooord. and something";
$newtext = wordwrap($text, 8, "
", false);
echo "$newtext
";
?>
The above example will output:
A very
long
woooooooooooooooooord.
and
something
SEE ALSO nl2br(3), chunk_split(3).
PHP Documentation Group WORDWRAP(3)