I will try to combine with user input and variable match and text ehich i said earlier
------ Post updated at 08:58 AM ------
i did it like this
So when execute it prints me only a
Quote:
Enter number:3
this is only a test
so please be patient
<color="red" />
this is only a test
so please be patient
<color="red" />
this is only a test
so please be patient
<color="red" />
It should print me
Quote:
Enter number:3
this is only a test
so please be patient
<color="red" />
MARIA
JACK
BRAD
------ Post updated at 08:58 AM ------
Quote:
Originally Posted by tomislav91
I will try to combine with user input and variable match and text ehich i said earlier
------ Post updated at 08:58 AM ------
i did it like this
So when execute it prints me only a
Hi,
I have a shell script to build components of a product. The follow snippet will explain what I am doing.
# !/bin/sh
for choice in "$@" ;
do
case $choice in
"o") echo "Calling $choice" ; o ;;
"i") echo... (8 Replies)
i have been doing this script to match every line in a current log file (access_log) with strings that i list from a path (consist of 100 of user's name ex: meggae )..
and then make a directory of every string from the text file (/path/meggae/) --->if it matched..
then print every line from the... (3 Replies)
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
i have a file1 with many lines. i have a script that will let me input a string. for example, APPLE. what i need to do is to copy all lines from file1 where i can find APPLE or any string that i specify and paste in on file 2
thanks in advance! (4 Replies)
Hi,
i want to know how to compare string of file with input string
im trying following code:
file_no=`paste -s -d "||||\n" a.txt | cut -c 1`
#it will return collection number from file
echo "enter number"
read " curr_no"
if ; then
echo " current number already present"
fi
... (4 Replies)
Hi
I have one thing I need advice on, and I don't know where to start so I have no sample code.
I want the user to provide input like: 1-3,6,7,9-11
When the input is like this, I want a string to be generated including all the numbers. In the example above, the string would look like:
1... (13 Replies)
I need to search a string for some specific text which is no big deal using grep. My problem is when the search fails to find the text. I need to add text like "na" when my search does not match.
I have tried this command but it does not work when I put the command in a loop in a bash script:
... (12 Replies)
I need to read a text file and insert a string every n lines, but also have the line counter restart when I come across a header string.
Line repeating working every 3 lines using code:
sed '0~3 s/$/\nINSERT/g' < INPUT/PATH/FILE_NAME.txt > OUTPUT/PATH/FILE_NAME.txt
I cannot seem to find... (1 Reply)
Discussion started by: Skonectthedots
1 Replies
LEARN ABOUT DEBIAN
xml::tmx::writer
XML::TMX::Writer(3pm) User Contributed Perl Documentation XML::TMX::Writer(3pm)NAME
XML::TMX::Writer - Perl extension for writing TMX files
SYNOPSIS
use XML::TMX::Writer;
my $tmx = new XML::TMX::Writer();
$tmx->start_tmx(id => 'paulojjs');
$tmx->add_tu(SRCLANG => 'en', 'en' => 'some text', 'pt' => 'algum texto');
$tmx->add_tu(SRCLANG => 'en',
'en' => 'some text',
'pt' => 'algum texto',
-note => [32, 34 ],
-prop => { q => 23,
aut => "jj"}
);
$tmx->end_tmx();
DESCRIPTION
This module provides a simple way for writing TMX files.
METHODS
The following methods are available:
new
$tmx = new XML::TMX::Writer();
Creates a new XML::TMX::Writer object
start_tmx
$tmx->start_tmx(-output => 'some_file.tmx');
Begins a TMX file. Several options are available:
-output
Output of the TMX, if none is defined stdout is used by default.
tool
Tool used to create the TMX. Defaults to 'XML::TMX::Writer'
toolversion
Some version identification of the tool used to create the TMX. Defaults to the current module version
segtype
Segment type used in the <tu> elements. Possible values are block, paragraph, sentence and phrase. Defaults to sentence.
srctmf
Specifies the format of the translation memory file from which the TMX document or segment thereof have been generated.
adminlang
Specifies the default language for the administrative and informative elements <note> and <prop>.
srclang
Specifies the language of the source text. If a <tu> element does not have a srclang attribute specified, it uses the one defined in
the <header> element. Defaults to *all*.
datatype
Specifies the type of data contained in the element. Depending on that type, you may apply different processes to the data.
The recommended values for the datatype attribute are as follow (this list is not exhaustive):
unknown
undefined
alptext
WinJoust data
cdf Channel Definition Format
cmx Corel CMX Format
cpp C and C++ style text
hptag
HP-Tag
html
HTML, DHTML, etc
interleaf
Interleaf documents
ipf IPF/BookMaster
java
Java, source and property files
javascript
JavaScript, ECMAScript scripts
lisp
Lisp
mif Framemaker MIF, MML, etc
opentag
OpenTag data
pascal
Pascal, Delphi style text
plaintext
Plain text (default)
pm PageMaker
rtf Rich Text Format
sgml
SGML
stf-f
S-Tagger for FrameMaker
stf-i
S-Tagger for Interleaf
transit
Transit data
vbscript
Visual Basic scripts
winres
Windows resources from RC, DLL, EXE
xml XML
xptag
Quark XPressTag
srcencoding
All TMX documents are in Unicode. However, it is sometimes useful to know what code set was used to encode text that was converted to
Unicode for purposes of interchange. This option specifies the original or preferred code set of the data of the element in case it is
to be re-encoded in a non-Unicode code set. Defaults to none.
id Specifies the identifier of the user who created the element. Defaults to none.
-note
A reference to a list of notes to be added in the header.
-prop
A reference fo a hash of properties to be added in the header. Keys are used as the "type" attribute, value as the tag contents.
add_tu
$tmx->add_tu(srclang => LANG1, LANG1 => 'text1', LANG2 => 'text2');
$tmx->add_tu(srclang => LANG1,
LANG1 => 'text1',
LANG2 => 'text2',
-note => ["value1", ## notes
"value2"],
-prop => { type1 => ["value1","value"], #multiple values
_ => 'value2', # anonymound properties
typen => ["valuen"],}
);
Adds a translation unit to the TMX file. Several optional labels can be specified:
id Specifies an identifier for the <tu> element. Its value is not defined by the standard (it could be unique or not, numeric or
alphanumeric, etc.).
srcencoding
Same meaning as told in start_tmx method.
datatype
Same meaning as told in start_tmx method.
segtype
Same meaning as told in start_tmx method.
srclang
Same meaning as told in start_tmx method.
end_tmx
$tmx->end_tmx();
Ends the TMX file, closing file handles if necessary.
SEE ALSO
TMX Specification <http://www.lisa.org/tmx/tmx.htm>
AUTHOR
Paulo Jorge Jesus Silva, <paulojjs@bragatel.pt>
Alberto Simo~es, <albie@alfarrabio.di.uminho.pt>
COPYRIGHT AND LICENSE
Copyright 2003 by Projecto Natura
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-05 XML::TMX::Writer(3pm)