Hello Experts,
I have a file "tt.txt" which is like:
#a1=a2
b1=b2
#c1=c2
I need to remove the pound (#) sign from a particular line. In this case let us assume it's 3rd line : "#c1=c2"
I can do it through:
sed "s/#c1=c2/c1=c2/" tt.txtbut it is possible that I may not know the value... (6 Replies)
Hi...
i need a script to remove the space before and after the operator like( / ).
Ex :
Input file
apple / manago
mango / fresh apple / fresh
Desired output:
apple/manago
mango/fresh apple/fresh
Note: betwee the desired operator space should be removed, between words do not remove... (3 Replies)
Hello!
Please bare with me, I'm a total newbie to scripting. Here's the sudo code of what I'm trying to do:
Get file name
Does file exist?
If true
get length of file name
get network id (this will be the last 3 numbers of the file name)
loop x 2
If... (1 Reply)
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Hi All,
I have output like this below
ldprod/03
ldprod/02
ldprod/01
ldprod/00
ldnprod/
ldnprod/030
I want only remove all character including /
ldprod
ldprod
ldprod
ldprod
ldprod
ldnprod (8 Replies)
Below i am trying to remove "/" and "r" from the output, so i need output as:
hdiskpower3
hdisk0
hdisk1
#inq | grep 5773 | awk '{print $1}' | sed 's/dev//g' | awk -F"/" '{$1=$1}1'
.....................................................//rhdiskpower0
//rhdiskpower1
//rhdiskpower2... (3 Replies)
Hi
I need help on this ..!!
Input :
xx_abc_regA
xx_def_regB
xx_qwe_regC
Now i required the output as the below
abc
def
qwe
Need to remove last occurrence of character (_) and rest of the string in Unix (sed).
Thanks in Advance ..!!!
-Nallachand (3 Replies)
hello.
How to remove all characters in a line from first character ( a $ ) until and including the third occurrence of that character ( $ ).
Any help is welcome. (10 Replies)
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
LEARN ABOUT PHP
ps_hyphenate
PS_HYPHENATE(3) 1 PS_HYPHENATE(3)ps_hyphenate - Hyphenates a wordSYNOPSIS
array ps_hyphenate (resource $psdoc, string $text)
DESCRIPTION
Hyphenates the passed word. ps_hyphenate(3) evaluates the value hyphenminchars (set by ps_set_value(3)) and the parameter hyphendict (set
by ps_set_parameter(3)). hyphendict must be set before calling this function.
This function requires the locale category LC_CTYPE to be set properly. This is done when the extension is initialized by using the envi-
ronment variables. On Unix systems read the man page of locale for more information.
PARAMETERS
o $psdoc
- Resource identifier of the postscript file as returned by ps_new(3).
o $text
-$text should not contain any non alpha characters. Possible positions for breaks are returned in an array of interger numbers.
Each number is the position of the char in $text after which a hyphenation can take place.
RETURN VALUES
An array of integers indicating the position of possible breaks in the text or FALSE on failure.
EXAMPLES
Example #1
Hyphennate a text
<?php
$word = "Koordinatensystem";
$psdoc = ps_new();
ps_set_parameter($psdoc, "hyphendict", "hyph_de.dic");
$hyphens = ps_hyphenate($psdoc, $word);
for($i=0; $i<strlen($word); $i++) {
echo $word[$i];
if(in_array($i, $hyphens))
echo "-";
}
ps_delete($psdoc);
?>
The above example will output:
Ko-ordi-na-ten-sys-tem
SEE ALSO ps_show_boxed(3), locale(1).
PHP Documentation Group PS_HYPHENATE(3)