@nezabudka: good approach, but you'll lose the leading fields if the pattern is found in later fields... does this come closer? EDIT: Indeed, you can drop the if:
Hi,
i have a question about to remove first word from a sentence.
my script;
#!/usr/bin/perl
$msgtxt = "this is a test script";
my @ap_txtMsg = split(/ +/, trim_data($msgtxt));
$ap_msgtxt = splice (@ap_txtMsg, 0, 1);
print $ap_msgtxt;
but the output is first word that i... (1 Reply)
Hi All,
If my file is:
Wed Sep 9 22:45:14 EDT 2009
sftp> sftp> sftp> sftp> sftp> sftp> sftp> sftp> sftp> sftp> sftp> sftp> sftp>
This is log file generated from transfer...
sftp> sftp> sftp> sftp> Files placed properly....
sftp> sftp> sftp>
How can I remove "sftp>" word from this... (4 Replies)
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
Hi All,
I have a file in which a number of lines are starting with similar first word but different next words.
I want to replace the any nth word(not 1st or 2nd) with another word.
Eg:- My file contains are like this:-
Ram is a boy.
Ram is a good boy.
Ram plays cricket.
Here I want to... (2 Replies)
Hi,
I have a file which has the following
/u12/data/oracle/abc.dbf
/u12/data/oracle/def.dbf
/u12/data/oracle/daf.dbf
/u12/data/oracledb/fgh.dbf
/u12/data/oracledb/fkh.dbf
/u12/data/oracledb/kdq.dbf
I want to do something like this
/u12/data/oracle
/u12/data/oracle... (7 Replies)
Hello All,
I am running a command find . -name amp.cfg | cut -c 3- which gives me output something like below
rel/prod/amp.cfg
rel/fld/amp.cfg
deb/detail/amp.cfg
deb/err/amp.cfg I want to remove trailing "/amp.cfg" so that i should get output something like... (7 Replies)
var=abc_cde_def_ghi_678.txt
Expected output:
cde_def_ghi_678.txt
Is there a better way to achive this other than cut command?
Basically, I need to remove the 1st word and _ from the string.
Thanks. (1 Reply)
Hi All,
I want to remove the first word "cn=" from the below details. Only I want the number like 171345,174144...
cn=171345
cn=174144
How can I achieve this.
Please suggest.
Thanks-
P (6 Replies)
Hello
I have a string that may or may not have 4 dots.
The string is actualy a file within a folder, where multiple files are located.
Files may look like:
# ls *
creds:
192.168.10.110 someserver
shares:
192.168.10.110.Public someserver.sharefolder
#
I want to fill 2 variables,... (1 Reply)
Hello,
I try to delete all strings if their first or last word is one of this list of words : "the", "i", "in", "there", "this", "with", "on", "we", "that", "of"
For example if i have this string in an input file "with me" this string will be removed,
Example: input
"the european... (2 Replies)
Discussion started by: cyrine
2 Replies
LEARN ABOUT CENTOS
thwbrk.h
thai/thwbrk.h(3) libthai thai/thwbrk.h(3)NAME
thai/thwbrk.h -
Thai wide-char word segmentation.
SYNOPSIS
Functions
int th_wbrk (const thwchar_t *s, int pos[], size_t n)
Find word break positions in Thai wide-char string.
int th_wbrk_line (const thwchar_t *in, thwchar_t *out, size_t n, const thwchar_t *delim)
Insert word delimitors in given wide-char string.
Detailed Description
Thai wide-char word segmentation.
Function Documentation
int th_wbrk (const thwchar_t *s, intpos[], size_tn)
Find word break positions in Thai wide-char string.
Parameters:
s : the input string to be processed
pos : array to keep breaking positions
n : size of pos[]
Returns:
the actual number of breaking positions occurred
Finds word break positions in Thai string s and stores at most n breaking positions in pos[], from left to right.
int th_wbrk_line (const thwchar_t *in, thwchar_t *out, size_tn, const thwchar_t *delim)
Insert word delimitors in given wide-char string.
Parameters:
in : the input wide-char string to be processed
out : the output wide-char buffer
n : the size of out (as number of elements)
delim : the wide-char word delimitor to insert
Returns:
the actual size of the processed string (as number of elements)
Analyzes the input string and store the string in output buffer with the given word delimitor inserted at every word boundary.
Author
Generated automatically by Doxygen for libthai from the source code.
Version 0.1.14 Tue Jun 17 2014 thai/thwbrk.h(3)