the sed works, but when I try to store the result ofthe sed command into a new txt file, it stores only part of it, and when i open this txt file in vi, whatever amount is stored is shown, and at the bottom of vi it says "line too long" How can I get everything that is grabbed?
I am executing a stored proc and sending the results in a log file. I then want to grab one result from the output parameters (bolded below, 2) so that I can store it in a variable which will then be called in another script. There are more details that get printed in the beginning of the log file,... (3 Replies)
I am new to Unix so will really appreciate if someone can guide me on this.
What I want to do is:
Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well.
2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Quick question...I'm trying to grab the .tif file name from this output from our fax server. What is the best way i can do this in a bash script? I have been looking at regular expressions with bash or using awk but having some trouble. thanks! The only output i want is... (5 Replies)
Hello,
I am really stuck and I'm hoping somone can help. I have a text file that is similar to this:
<--First User-->
<function>account='uid=user1,.......
<--Second User-->
<function>account='uid=user2,.......What I want is to grab the usernames after "uid=" and before the following... (9 Replies)
Using awk how to delete chunk of text if it contains certain strings? As in the following, delete a reference chunk, i.e. everything from <reference attribute = "value"> to </reference> inclusive, if within it "Group ID" value is 7 or 96 or 103 or 1005.
<reference attribute = "value">
... (3 Replies)
If I have a txt file with
test.txt
somelineoftext
and I want to set that line of text to variable in a script:
so
#!/bin/bash
var=''
becomes
#!/bin/bash
var='somelineoftext' (3 Replies)
I have a text file that shows the output of my solar inverters. I want to separate this into sections. overview , device 1 , device 2 , device 3. Each device has different number of lines. but they all have unique starting points. Overview starts with 6 #'s, Devices have 4#'s and their data starts... (6 Replies)
greetings,
i'll start by stating; i am NOT looking for the EXACT syntax to my query but a simple yes or no of its possibility. and if you're feeling generous maybe the php function(s) that i'd use as a jump start. i could use bash but i really want to take a shot at doing this with php. the... (0 Replies)
I would like to grab complex html text between lines using variables. I am running Debian and using mksh shell.
Here is the part of the html that I want to extract from. I would like to extract the words 'to love,' and I would like to use the above and below lines as reference points.
... (3 Replies)
Discussion started by: bedtime
3 Replies
LEARN ABOUT DEBIAN
log::report::translator
Log::Report::Translator(3pm) User Contributed Perl Documentation Log::Report::Translator(3pm)NAME
Log::Report::Translator - base implementation for translating messages
INHERITANCE
Log::Report::Translator is extended by
Log::Report::Translator::Gettext
Log::Report::Translator::POT
SYNOPSIS
# internal infrastructure
my $msg = Log::Report::Message->new(_msgid => "Hello World
");
print Log::Report::Translator->new(...)->translate($msg);
# normal use
use Log::Report 'my-domain';
print __"Hello World
";
DESCRIPTION
A module (or distribution) has a certain way of translating messages, usually "gettext". The translator is based on the "textdomain" for
the message, which can be specified as option per text element, but usually is package scoped.
This base class does not translate at all: it will use the MSGID (and MSGID_PLURAL if available). It's a nice fallback if the language
packs are not installed.
METHODS
Constructors
Log::Report::Translator->new(OPTIONS)
-Option --Default
charset <from locale>
lexicon <see text>
charset => STRING
When the locale contains a codeset in its name, then that will be used. Otherwise, the default is "utf-8".
lexicon => DIRECTORY|ARRAY-of-DIRECTORYs
The DIRECTORY where the translations can be found. See Log::Report::Lexicon::Index for the expected structure of such DIRECTORY.
The default is based on the location of the module which instantiates this translator. The filename of the module is stripped from
its ".pm" extension, and used as directory name. Within that directory, there must be a directory named "messages", which will be
the root directory of a Log::Report::Lexicon::Index.
example: default lexicon directory
# file xxx/perl5.8.8/My/Module.pm
use Log::Report 'my-domain'
, translator => Log::Report::Translator::POT->new;
# lexicon now in xxx/perl5.8.8/My/Module/messages/
Accessors
$obj->charset
Returns the default charset, which can be overrule by the locale.
$obj->lexicons
Returns a list of Log::Report::Lexicon::Index objects, where the translation files may be located.
Translating
$obj->load(DOMAIN, LOCALE)
Load the translation information in the text DOMAIN for the indicated LOCALE. Multiple calls to load() should not cost significant
performance: the data must be cached.
$obj->translate(MESSAGE)
Returns the translation of the MESSAGE, a "Log::Report::Message" object, based on the current locale.
Translators are permitted to peek into the internal HASH of the message object, for performance reasons.
SEE ALSO
This module is part of Log-Report distribution version 0.94, built on August 23, 2011. Website: http://perl.overmeer.net/log-report/
LICENSE
Copyrights 2007-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2011-08-23 Log::Report::Translator(3pm)