Sponsored Content
Top Forums Shell Programming and Scripting Extract multiple strings from line Post 302964286 by bombcan on Wednesday 13th of January 2016 06:44:29 AM
Old 01-13-2016
Thank-You cfajohnson & MadeInGermany for your time and these useful posts. They all work great.Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to extract multiple strings from a line

Hi I have the following requirement. i have the following line from a log file one : two : Three : four : five : six : seven : eight :nine :ten Now can you pls help what i should do to get only the following output from the above line two : five : six : seven : Eight appreciate your... (3 Replies)
Discussion started by: vin_eme
3 Replies

2. Shell Programming and Scripting

Grepping Multiple Strings on the Same Line 'Or'

I've got this command that I've been using to find strings on the same line, say I'm doing a search for name: find . -name "*" | xargs grep -i "Doe" | grep -i "John" > output.txt This gives me every line in a file that has John and Doe in it. I'm looking to add a OR operator for the second... (5 Replies)
Discussion started by: Rally_Point
5 Replies

3. Shell Programming and Scripting

How to extract multiple line in a paragraph? Please help.

Hi all, The following lines are taken from a long paragraph: Labels of output orbitals: RY* RY* RY* RY* RY* RY* 1\1\GINC-COMPUTE-1-3\SP\UB3LYP\6-31G\C2H5Cr1O1(1+,5)\LIUZHEN\19-Jan-20 10\0\\# ub3lyp/6-31G pop=(nbo,savenbo) gfprint\\E101GECP\\1,5\O,0,-1.7 ... (1 Reply)
Discussion started by: liuzhencc
1 Replies

4. Shell Programming and Scripting

Extract strings from multiple lines into one file -

input file Desired csv output gc_type, date/time, milli secs af, Mar 17 13:09:04 2011, 144.596 af, Mar 20 00:37:37 2011, 144.242 af, ar 20 21:30:59 2011, 108.518 Hi All, Any help in acheiving the above would be appreciated. I would like to parse through lines within one file and... (5 Replies)
Discussion started by: satish.vampire
5 Replies

5. Shell Programming and Scripting

Extract strings from multiple lines into one csv file

Hi all, Please go through my requirement. I have a log file in the location /opt/WebSphere61/AppServer/profiles/EMQbatchprofile/logs/EMQbatch This file contains the follwing pattern data <af type="tenured" id="42" timestamp="May 14 13:44:13 2011" intervalms="955.624"> <minimum... (8 Replies)
Discussion started by: satish.vampire
8 Replies

6. Shell Programming and Scripting

ksh: how to extract strings from each line based on a condition

Hi , I'm a newbie.Never worked on Unix before. I want a shell script to perform the following: I want to extract strings from each line ,based on the type of line(Nameline,Subline) and output it to another file.Below is a sample format. 2010-12-21 14:00"1"Nameline"Midterm"First Name:Jane ... (4 Replies)
Discussion started by: angie1234
4 Replies

7. Shell Programming and Scripting

awk? extract quoted "" strings from multiple lines.

I am trying to extract multiple strings from snmp-mib files like below. ----- $ cat IF-MIB.mib <snip> linkDown NOTIFICATION-TYPE OBJECTS { ifIndex, ifAdminStatus, ifOperStatus } STATUS current DESCRIPTION "A linkDown trap signifies that the SNMP entity, acting in... (5 Replies)
Discussion started by: genzo
5 Replies

8. Shell Programming and Scripting

awk extract strings matching multiple patterns

Hi, I wasn't quite sure how to title this one! Here goes: I have some already partially parsed log files, which I now need to extract info from. Because of the way they are originally and the fact they have been partially processed already, I can't make any assumptions on the number of... (8 Replies)
Discussion started by: chrissycc
8 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

USING sed to remove multiple strings/words from a line

Hi I use sed comnand to remove occurance of one workd from a line. However I need to removed occurance of dufferent words in ne line. Original-1 Hi this is the END of my begining Comand sed s/"END"/"start"/g Output-1 Hi this is the start of my beginig But I have more... (9 Replies)
Discussion started by: mnassiri
9 Replies
XGETTEXT(1)						User Contributed Perl Documentation					       XGETTEXT(1)

NAME
xgettext.pl - Extract translatable strings from source VERSION
version 0.99 SYNOPSIS
xgettext.pl [OPTION] [INPUTFILE]... DESCRIPTION
This program extracts translatable strings from given input files, or from STDIN if none are given. Please see Locale::Maketext::Extract for a list of supported input file formats. OPTIONS
Mandatory arguments to long options are mandatory for short options too. Similarly for optional arguments. Input file location: INPUTFILE... Files to extract messages from. If not specified, STDIN is assumed. -f, --files-from=FILE Get list of input files from FILE. -D, --directory=DIRECTORY Add DIRECTORY to list for input files search. Input file format: -u, --use-gettext-style Specifies that the source programs uses the Gettext style (e.g. %1) instead of the Maketext style (e.g. "[_1]") in its localization calls. Output file location: -d, --default-domain=NAME Use NAME.po for output, instead of "messages.po". -o, --output=FILE PO file name to be written or incrementally updated; "-" means writing to STDOUT. -p, --output-dir=DIR Output files will be placed in directory DIR. Output details: -g, --gnu-gettext Enables GNU gettext interoperability by printing "#, perl-maketext-format" before each entry that has "%" variables. -W, --wrap If wrap is enabled, then, for entries with multiple file locations, each location is listed on a separate line. The default is to put them all on a single line. Other comments are not affected. Plugins: By default, all builtin parser plugins are enabled for all file types, with warnings turned off. If any plugin is specified on the command line, then warnings are turned on by default - you can turn them off with "-now" -P|--plugin pluginname Use the specified plugin for the default file types recognised by that plugin. -P|--plugin 'pluginname=*' Use the specified plugin for all file types. -P|--plugin pluginname=ext,ext2 Use the specified plugin for any files ending in C<.ext> or C<.ext2> -P|--plugin My::Module::Name='*' Use your custom plugin module for all file types Multiple plugins can be specified on the command line. Available plugins: "perl" : Locale::Maketext::Extract::Plugin::Perl For a slightly more accurate but much slower Perl parser, you can use the PPI plugin. This does not have a short name, but must be specified in full, eg: xgettext.pl -P Locale::Maketext::Extract::Plugin::PPI "tt2" : Locale::Maketext::Extract::Plugin::TT2 "yaml" : Locale::Maketext::Extract::Plugin::YAML "formfu" : Locale::Maketext::Extract::Plugin::FormFu "mason" : Locale::Maketext::Extract::Plugin::Mason "text" : Locale::Maketext::Extract::Plugin::TextTemplate "generic" : Locale::Maketext::Extract::Plugin::Generic Warnings: If a parser plugin encounters a syntax error while parsing, it will abort parsing and hand over to the next parser plugin. If warnings are turned on then the error will be echoed to STDERR. Off by default, unless any plugin has been specified on the command line. -w|--warnings -now|--nowarnings Verbose: If you would like to see which files have been processed, which plugins were used, and which strings were extracted, then enable "verbose". If no acceptable plugin was found, or no strings were extracted, then the file is not listed: -v|--verbose Lists processed files. -v -v|--verbose --verbose : Lists processed files and which plugins managed to extract strings. -v -v|--verbose --verbose : Lists processed files, which plugins managed to extract strings, and the extracted strings, the line where they were found, and any variables. SEE ALSO
Locale::Maketext::Extract Locale::Maketext::Lexicon::Gettext Locale::Maketext Locale::Maketext::Extract::Plugin::Perl Locale::Maketext::Extract::Plugin::PPI Locale::Maketext::Extract::Plugin::TT2 Locale::Maketext::Extract::Plugin::YAML Locale::Maketext::Extract::Plugin::FormFu Locale::Maketext::Extract::Plugin::Mason Locale::Maketext::Extract::Plugin::TextTemplate Locale::Maketext::Extract::Plugin::Generic AUTHORS
Audrey Tang <cpan@audreyt.org> COPYRIGHT
Copyright 2002-2008 by Audrey Tang <cpan@audreyt.org>. This software is released under the MIT license cited below. The "MIT" License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTHORS
o Clinton Gormley <drtech@cpan.org> o Audrey Tang <cpan@audreyt.org> COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Audrey Tang. This is free software, licensed under: The MIT (X11) License perl v5.18.2 2014-02-03 XGETTEXT(1)
All times are GMT -4. The time now is 03:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy