Sponsored Content
Full Discussion: Extract only first occurance
Top Forums UNIX for Beginners Questions & Answers Extract only first occurance Post 303015548 by RudiC on Friday 6th of April 2018 01:10:50 PM
Old 04-06-2018
Any attempts / ideas / thoughts from your side?

First occurrence of what?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk: last occurance

Hi All, I need to extract the last occurance of a pattern match. So far I've got the code below which extracts the first occurance. Any ideas how I can modify it so that it extracts the last? BEGIN {} { if (data++ == 0) ... (17 Replies)
Discussion started by: pondlife
17 Replies

2. Shell Programming and Scripting

How to insert values in 1st occurance out of two occurance in a file

Hi I have a file which contains the following two lines which are same But I would like to insert the value=8.8.8.8 in the 1st occurance line and value=9.9.9.9 in the 2nd occurance line. <parameter name="TestIp1" value=""> <parameter name="TestIp1" value=""> Please suggest (1 Reply)
Discussion started by: madhusmita
1 Replies

3. Shell Programming and Scripting

Split on last occurance

I want to call a script like this: ./somescript some-thing.knows.what.ending Inside the script it needs to split at last .(period) so I can: a=some-thing.knows.what b=ending I know I can do it in perl but im still learing awk and sed. Thanks (3 Replies)
Discussion started by: Ikon
3 Replies

4. Shell Programming and Scripting

First occurance

A PERL script that prints just the first occurrence of a string in a file and immediately exits (the string and the filename are the first and the second command line arguments; I used filehandle to open an input file). (1 Reply)
Discussion started by: aadi_uni
1 Replies

5. Shell Programming and Scripting

extract till occurance of a string

hi , i have an xml that comes in a single, the entire xml file is read as a single line when i open in edit plus or unix. i need to amend the contents of this xml file. below is the extract from the file <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"... (5 Replies)
Discussion started by: sais
5 Replies

6. Shell Programming and Scripting

Trying to grep for '--' occurance

Hello Im trying to grep for a string in grub.conf . I've used the -F option since its a long string, but when i execute, i run into errors. Script and output below. GRUBPASSWD="password --md5 xyz" if grep -Fxq $GRUBPASSWD /etc/grub.conf then . . output: grep: unrecognized option... (5 Replies)
Discussion started by: bludhemn
5 Replies

7. Shell Programming and Scripting

replace every second occurance of a string

I want to replace every 2nd occurance of a string/character from a line. ababacbsbddbsbbcbdbssb i want to replace every s2nd b with @ like below should be like aba@acbs@ddbs@bc@dbss@ (3 Replies)
Discussion started by: ratheeshjulk
3 Replies

8. Shell Programming and Scripting

Multiple occurance of file

Hi all, I have file structure as file.log 84t-rw-r--r-- 1 emily04 us_cms 24492717 Oct 5 13:29 vgtree_84_1_K3L.root 85t-rw-r--r-- 1 emily04 us_cms 50410380 Oct 5 16:06 vgtree_85_1_uZv.root 85t-rw-r--r-- 1 emily04 us_cms 50567380 Oct 5 16:06 vgtree_85_1_hjv.root 86t-rw-r--r-- 1 emily04... (4 Replies)
Discussion started by: emily
4 Replies

9. Shell Programming and Scripting

Extract multiple occurance of strings between 2 patterns

I need to extract multiple occurance strings between 2 different patterns in given line. For e.g. in below as input ------------------------------------------------------------------------------------- mike(hussey) AND mike(donald) AND mike(ryan) AND mike(johnson)... (8 Replies)
Discussion started by: sameermohite
8 Replies

10. Shell Programming and Scripting

ksh sed - Extract specific lines with mulitple occurance of interesting lines

Data file example I look for primary and * to isolate the interesting slot number. slot=`sed '/^primary$/,/\*/!d' filename | tail -1 | sed s'/*//' | awk '{print $1" "$2}'` Now I want to get the Touch line for only the associate slot number, in this case, because the asterisk... (2 Replies)
Discussion started by: popeye
2 Replies
apertium-lextor(1)														apertium-lextor(1)

NAME
apertium-lextor - This application is part of ( apertium ) This tool is part of the apertium machine translation architecture: http://apertium.org. SYNOPSIS
apertium-lextor --trainwrd stopwords words n left right corpus model [ --weightexp w ] [ --debug ] apertium-lextor --trainlch stopwords lexchoices n left right corpus wordmodel dic bildic model [ --weightexp w ] [ --debug ] apertium-lextor --lextor model dic left right [ --debug ] [ --weightexp w ] DESCRIPTION
apertium-lextor is the application responsible for training and usage of the lexical selector module. OPTIONS
--trainwrd | -t Train word co-occurrences model. It needs the following required parameters: stopwords file containing a list of stop words. Stop words are ignored. words file containing a list of words. For each word a co-occurrence model is built. n number of words per co-occurrence model (for each model, the n most frequent words). left left-side context to take into account (number of words). right right-side context to take into account (number of words). corpus file containing the training corpus. model output file on which the co-occurrence models are saved. --trainlch | -r Train lexical choices co-occurrence models using a target language co-occurrence model and a bilingual dictionary. It needs the following required parameters: stopwords file containing a list of stop words. Stop words are ignored. lexchoices file containing a list of lexical choices. For each lexical choice a co-occurrence model is built. n number of words per co-occurrence model (for each model, the n most frequent words). left left-side context to take into account (number of words). right right-side context to take into account (number of words). corpus file containing the training corpus. wordmodel target-language word co-occurrence model (previously trained by means of the --trainwrd option). dic the lexical-selection dictionary (binary format). bildic the bilingual dictionary (binary format). model output file on which the co-occurrence models are saved. --lextor | -l Perform the lexical selection on the input stream. It needs the following required parameters: model file containing the model to be used for the lexical selection. dic lexical-selection dictionary (binary format). left left-side context to take into account (number of words). right right-side context to take into account (number of words). --weightexp w Specify a weight value to change the influence of surrounding words while training or performing the lexical selection. The parameter w must be a positive value. --debug | -d Show debug information while working. --help | -h Shows this help. --version | -v Shows license information. SEE ALSO
apertium-gen-lextorbil(1), apertium-preprocess-corpus-lextor(1), apertium-gen-stopwords-lextor(1), apertium-gen-wlist-lextor(1), aper- tium-gen-wlist-lextor-translation(1), apertium-lextor-eval(1), apertium-lextor-mono(1). BUGS
Lots of...lurking in the dark and waiting for you! AUTHOR
(c) 2005,2006 Universitat d'Alacant / Universidad de Alicante. All rights reserved. 2006-12-12 apertium-lextor(1)
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy