Sponsored Content
Top Forums Shell Programming and Scripting Perl: selective printing of lines Post 302554757 by yazu on Tuesday 13th of September 2011 02:14:37 AM
Old 09-13-2011
I can suggest, that you either:
1. want a work to be done, or
2. want to learn perl, or
3. want to do your homework.
It's not the first case, because you want specifically a perl solution. I can't say it is the second because you don't know about 'my' construction - and you can't learn anything without knowing elementary things. So you don't want to learn perl and it can be suggested that you just want to get a solution for your exercise. Ok, maybe someone will want to do it for you but it's just not me.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

selective printing awk

Hi there my file looks like this 1 a b c d e f 2 a b b c d e f f g h e t t 3 a c b d e f 4 a b c i want to print the line which has the fields containing ONLY a b c, in this case the line 4. How can i awk it !!!? Many Thanks in advance! (8 Replies)
Discussion started by: saint2006
8 Replies

2. Shell Programming and Scripting

selective printing of lines

Hi all , i need to grep for a string in a text file and print the string and the 3rd line above it. As always , Thanks. (4 Replies)
Discussion started by: okiedokie
4 Replies

3. Shell Programming and Scripting

Perl: Printing Multiple Lines after pattern match

Hello People, Need some assistance/guidance. OUTLINE: Two files (File1 and File2) File1 has some ids such as 009463_3922_1827 897654_8764_5432 File2 has things along the lines of: Query= 009463_3922_1827 length=252 (252 letters) More stufff here ... (5 Replies)
Discussion started by: Deep9000
5 Replies

4. Shell Programming and Scripting

sed selective printing

Hi, I have an xml file having serveral smiliar lines as below <INPUT VAR1 ="" DATATYPE ="number(p,s)" VAR2 ="" VAR3 ="3" VAR4="0" VAR5 ="ELEMITEM" VAR6 ="NO" VAR7 ="NOT A KEY" VAR8 ="17" LEVEL ="0" NAME ="UNIX" NULLABLE ="NOTNULL" OCCURS ="0" OFFSET ="19" PHYSICALLENGTH ="15"... (3 Replies)
Discussion started by: dips_ag
3 Replies

5. Shell Programming and Scripting

Awk selective printing

Hi, i need help to print number from different field INPUT: Student1 10 20 Student2 30 40 Student3 50 60 Student4 70 80 Desired Output: 1 20-30 2 40-50 3 60-70 Thank you! (5 Replies)
Discussion started by: saint2006
5 Replies

6. Shell Programming and Scripting

selective printing

hi all from below text "abcd,SYS_12345,xyz,PQR, ," I want to print only "abcd,SYS,xyz,PQR, ," i.e. taking only first three 3 chars from 2 string of comma separated file thanks (4 Replies)
Discussion started by: JoeColeEPL9
4 Replies

7. Shell Programming and Scripting

Selective printing

I have the following contents in a file ---- CRITICAL: altered for /usr/bin/bin1 ---- OK: /usr/sbin/bin2 result fine ---- OK: /usr/sbin/bin3 result fine ---- CRITICAL: altered for /usr/bin/bin4 ---- OK: /usr/bin/bin5 result fine ---- OK: /usr/bin/bin6 result fine ---- CRITICAL: altered for... (9 Replies)
Discussion started by: anil510
9 Replies

8. Shell Programming and Scripting

Selective printing based on matched record

Hi, I have file with thousands of lines somewhat similar to the below 6 lines 06MXXXXXXXXXXXXXXXX 0328 003529 J27300022 MICROSOFT *MSN 06<1 000000001344392 JPN151-85830 MSBILL.INFO F 06<A17087454000328651551 MSBILL.INFO ... (16 Replies)
Discussion started by: dsid
16 Replies

9. Shell Programming and Scripting

awk Selective printing of fields

Hi Gurus, I have following input file. I tried multiple awk combinations to print selected columns without success. HEX ID Name ver FLRGT Start Time Total Shared End Date ----- -------- --- ------ ------------------------ -------------- -------... (4 Replies)
Discussion started by: shunya
4 Replies

10. UNIX for Beginners Questions & Answers

Continued trouble matching fields in different files and selective field printing ([g]awk)

I apologize in advance, but I continue to have trouble searching for matches between two files and then printing portions of each to output in awk and would very much appreciate some help. I have data as follows: File1 PS012,002 PRQ 0 1 1 17 1 0 -1 3 2 1 2 -1 ... (7 Replies)
Discussion started by: jvoot
7 Replies
gtranslator(1)							  GNOME programs						    gtranslator(1)

NAME
gtranslator -- a comfortable gettext po file editor with many bells and whistles. SYNOPSIS
gtranslator [ --help ] [ --version ] [ -a filename ] [ -e po-file ] [ -g geometry-string ] [ -l po-file-to-learn ] [ -b ] [ -s ] DESCRIPTION
gtranslator is a comfortable gettext po file editor with many features like special char featured editing, plural forms view, div. charset support, comfortable prefs, list view of messages, regular expression based search function, compile/update possiblities and much much more. Of course all standard features of a good application like DnD, session support, supplement files for mime types and menu items are present. Instant comment view, a comfortable quick navigation messages table with customizable colors, colorschemes, UTF-8 support, a high level of preferizabilation and a personal learn buffer/translation memory with autotranslation capabilities are the main features of gtranslator besides the comfortable editing of the translation entries. OPTIONS
-a --auto-translate=po-file Autotranslates the given po file with the entries from the learn buffer and exits afterwards. -e --export-learn-buffer=po-file-to-export Exports the learn buffer contents into the given plain gettext po file and exits. -g --geometry=geometry Let's you specify the geometry of gtranslator's main window. -l --learn=po-file-to-learn Learns the given po file within the command line without starting the GUI. The personal learn buffer is used as a translation memory to autoaccomplish missing translations/entries. -s --learn-statistics Print out some statistics and information about the learn buffer of gtranslator on the commandline. --display With this option you can select on which screen gtranslator should appear. --help Shows you a little help autogenerated by GNOME and with the options mentioned above. --version Prints out the version number of gtranslator. --usage Shows you the pill of options without an explanation. FILES
~/.gconf/apps/gtranslator Your personal gtranslator settings will be stored there. ~/.gtranslator This directory is used by gtranslator for all it's "private" files (e.g. temporary files). ~/.gtranslator/colorschemes/ Your personal colorschemes can be placed in this directory -- gtranslator does also list the colorschemes in this directory in the colorscheme selection box. ~/.gtranslator/etstates/ The state file for the messages table/tree is stored in this directory. ~/.gtranslator/umtf/ Your personal learn buffers (in UMTF format) are stored in this directory -- the learn buffer is used for auto translation issues. ~/.gtranslator/files/ Temporary files used by gtranslator are stored in this directory (mostly this directory should be empty). LEARN BUFFER
The learn buffer is the implementation of a personal translation memory (TM) in gtranslator. gtranslator uses the UMTF (a compressed XML file which is normally quite good human readable if uncompressed) format for storing it's learned strings. Your learned strings are then available for the autotranslation feature of gtranslator where gtranslator automatically fills in the corre- sponding and valuable translations for any message which has already been learned previously. This results in a fairly high percentage of prefilled/pretranslated messages. The common and good style of working with the learn buffer and with the autotranslation should be to learn the main po/translation files for your language via gtranslator via calling gtranslator -n -l po-file-to-learn on the command line; this will put the translated strings from this po file into your personal learn buffer. You should learn the main po files (for GNOME for example gnumeric, nautilus, evolution or any other bigger, already translated package's po file) for your language); you can use a new script from the gtranslator package to automatise this task a little bit: it's "build- gtranslator-learn-buffer.sh" which is installed into gtranslator's scripts directory which you can see by calling gtranslator -b and you simply execute the script with it's full path and simply follow the information on the command line for it. Afterwards you can simply use the "Autotranslation" menu entry from the GUI or use the "F10" hotkey to let gtranslator autotranslate all missing translations from your personal learn buffer. This will ease your translation work and make a big portion of the po files be pre-translated. With a fairly big personal learn buffer of about 2 MB you can achive many pre-translated messages for a new project/translation. If you want to use the stored learn buffer contents to produce a po file with all the "learned" translations, you can also use the "export learn buffer" capability of gtranslator to get a plain po file version of the learn buffer. USAGE EXAMPLES
Some examples for the options. gtranslator -b Shows you the real build specs/dates of gtranslator. gtranslator -s Give me statistics about the learn buffer of gtranslator. gtranslator -n -l po-file-to-learn Learns the given po file "po-file-to-learn" on the command line without starting up the GUI. gtranslator -a po-file Autotranslates all missing entries from the learn buffer if possible and exits. gtranslator -e po-file-to-export Exports your current learn buffer to the given plain gettext po file ("po-file-to-export"). gtranslator po-file Starts gtranslator with the given po-file loaded on startup. gtranslator -g "460x320+0+0" Lets gtranslator appear on the left upper edge of the screen "+0+0" and gtranslator is sized to "460x320" if possible -- if gtrans- lator needs more size for it's window contents, it'll expand itself to the necessary dimensions -- even if you defined a smaller geometry string. LICENSE
gtranslator is distributed under the GNU GPL V 2.0 or greater. AUTHORS
Ross Golder <ross@kabalak.net>, Fatih Demir <kabalak@kabalak.net> (previously also: Gediminas Paulauskas <menesis@kabalak.net>, Thomas Ziehmer <thomas@kabalak.net>, Kevin Vandersloot <kfv101@psu.edu> and Peeter Vois <peeter@kabalak.net>). WEBSITE
http://www.gtranslator.org BUGREPORTS
You can deliver bug reports to the gtranslator development team to our bug base via http://bugzilla.gnome.org/enter_bug.cgi?product=gtrans- lator VERSION
gtranslator 2.91.4 man-page gtranslator gtranslator 2.91.4 -- 2012-05-11 gtranslator(1)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy