What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end.
Here is an example of what I would like my... (6 Replies)
I have a data file in the following format (refer to input file) with multiple lines containing some information. I need an output file to loop thorough the input file with summarized information as seen below (refer to output file) ‘Date Time' and ‘Beta Id' input file values should be concatenated... (7 Replies)
Please help in the following problem:
Input is:
Pritam
123
456
Patil
myname
youname
Pritam
myproject
thisproject
iclic
Patil
remaining text
some more text
I need the command which will display the no of lines between two words in the whole file.
e.g. Display all the no of lines... (5 Replies)
Hi!
I have a file that looks like this:
AAG
----------------------------------------------------------------------
Number of residues in the repeat = 3
AGA
----------------------------------------------------------------------
Number of residues in the repeat = 3
AGG
... (2 Replies)
Hi,
I had posted few days back and got replies on how to extract patterns from a file.
I had another question. I want to count the number of lines a particular pattern. I thought of somethings like using NF variable, etc, but they didnt work.
Here is sample input.
... (9 Replies)
I have a file that I need to merge with another like file. Normally I remove the trailer reocrd and merge the file and update the trailer record of the second file. I did a WC -l on the first file before I removed the trailer record, and again afterwards. The count came back the same. I opened the... (6 Replies)
I try to count number of lines of a data.txt file and then if number of lines is greater than 1 then email me the file.
I could not find what is wrong with my code, hope you can point out the mistake i made
#! /bin/ksh
count =`cat /from/file/data.txt | wc -l`
if ]; then
mailx -s... (4 Replies)
I have 2 files, and I want to count how many lines contain matching words.
Example:
file1
a_+b
a_+b_+c
file2
ab a_+b
a_+bc
I want to get 1, as the the first line of file1 is a substring of the first line of file2. While the second line isn't.
I suspect using sdiff, but not sure how to... (3 Replies)
Hi all,
I have my script to execute number of commands (command line interface) using TCL.
the execution and response of the commands get stored in some log file.
While the execution is going on i need only the time of execution and the number of line getting executed to be displayed in... (1 Reply)
I am tiring to cont numbers of line between the "!" in CISCO routers
I have no problem to extract the input and change the empty line with !
!
5 Cable5/0/1 U0 4
5 Cable5/0/1 U1 4
!
5 Cable5/0/1 U2 4 ... (4 Replies)
Discussion started by: sharong
4 Replies
LEARN ABOUT DEBIAN
apertium-lextor
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)