I am glad if it was useful, @jiam912
The code has grown a bit, but I could not find another way to get around the buffer size limit
The problem was as follows.
If the string starting with 'a' was even line then the code did not work properly.
Add the 'l' command to look at the contents of the buffer (the line marked at the end with a dollar sign)
and add one line to the input file.
а new version
Last edited by nezabudka; 02-29-2020 at 02:52 AM..
I want to delete lines like this
sed '/FROM_HERE/,/TO_HERE/d'
but I would like to *not* delete the second match, i.e. the TO_HERE line. How can I achieve this?
Thank you! (1 Reply)
Hi, I've searched in this forum all day long but was not able to find enough codes to help me do a task. The only code that I can come up with is this:
sed '/ /,/ /{//p;d;}' inputfile > outputfile
I would like to sed/awk/grep a file for two patterns and then delete the lines between... (4 Replies)
Hi All,
Below is my requirement. Whatever coming in between ' ', needs to delete.
Input File Contents:
==============
This is nice 'boy'
This 'is
bad
boy.' Got it
Expected Output
===========
This is nice
This
Got it (4 Replies)
Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows.
header for file
1111
2222
3333
header for file
1111
2222
3333
header for file... (8 Replies)
Hi,
i need help to delete all the lines between 2 matched patterns and the first pattern must be deleted too. sample as follows:
inputfile.txt
>kump_1
...........................
...........................
>start_0124
dgfhghgfh
fgfdgfh
fdgfdh
>kump_2
............................. (7 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Hi, I need to print lines which are matching with start pattern "SELECT" and END PATTERN ";" and only select the last "select" statement including the ";" .
I have attached sample input file and the desired input should be as:
INPUT FORMAT:
SELECT
ABCD,
DEFGH,
DFGHJ,
JKLMN,
AXCVB,... (5 Replies)
Discussion started by: nani2019
5 Replies
LEARN ABOUT DEBIAN
g2p-sk
g2p-sk(1) USER COMMANDS g2p-sk(1)NAME
g2p-sk - phonetic transcription for Slovak
SYNOPSIS
g2p-sk [--color] [--dl debug level] [--help] [--stats] [--ofile <file_name>] [<input file>]
DESCRIPTION
The phonetic transcription is essential for some linguistic or speech recognition applications. Depending on the language either rule based
or statistical approach is being used. g2p-sk implements the rule based approach but in the future it may be replaced by statistical one.
Each input word consisting of the sequence of graphemes is transcribed in to the sequence of phones in the SAMPA coding. If no input file
is specified, the standard input is expected. If input file is used then the output is written in to the file as well. The filename is
input filename with the extension "_trans.txt".
The input output code page is ISO 8859-2. To use it with different CP use some CP converter and pipes. For example to have input and output
in UTF-8 use (for interactive use): filterm UTF8-iso2 iso2-UTF8 g2p-sk or (for batch processing) iconv -f UTF-8 -t ISO_8859-2 | g2p-sk |
iconv -f ISO_8859-2 -t UTF-8
Performance of the phonetic transcription depend on the morphematic segmentation. To improve the quality of the morphematic segmentation is
possible to replace the small version of the simple morphematic dictionary in the /usr/share/g2p_sk/Exceptions/morfemy.ddat with the better
one. The syllabic segmentation is as important as morphematic one. The syllabic segmentation is provided by sylseg-sk package.
The design of the g2p-sk is language dependent. To use it for another language the all rules need to be rewritten.
OPTIONS --color
Enable color output.
--dl 1..5
Set the debug level. Control the amount of displayed information The debug level 0 displays nothing. The maximum level 5 displays
full debugging report. The default debug level is 1.
--help Display a short help text
--ofile <file_name>
Write output also in to given file.
--stats
Count and display statistic for each phone
EXAMPLES
Use standard input and debug level 3:
g2p-sk --dl 3
Process all the from file aaa.txt:
g2p-sk aaa.txt
EXIT STATUS
g2p-sk returns a zero if it succeeds to process all the input words
AUTHOR
Jozef Ivanecky (dodo (at) kanoistika.sk)
SEE ALSO sylseg-sk(1), filterm(1), iconv(1), konwert(1)version 0.4 May 17, 2009 g2p-sk(1)