11-12-2015
Quote:
Originally Posted by
Don Cragun
It looks like there is a mismatch between the Locale that was used when creating the file and the Locale used when running your awk script.
Try running your awk script again with the LC_CTYPE environment variable set to a locale that uses the same character set used to write your file and that contains the accented characters in your file in class alpha.
I know this is a zombie thread, I just wanted to mention that setting the
variable to UTF-8 completely solved the problem. Thank you!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello. Im just starting to learn awk so hang in there with me...I have a large text file formatted as such everything is in a single column
ID001
value 1
value 2
value....n
ID002
value 1
value 2
value... n
I want to be able to calculate the average for values for each ID from the... (18 Replies)
Discussion started by: johnmillsbro
18 Replies
2. Shell Programming and Scripting
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Discussion started by: repinementer
16 Replies
3. Shell Programming and Scripting
Hi Experts,
The content of the raw file:
date,nomsgsent,nomsgnotdeliver,nomsgdelay
201003251000,1000,1,2
201003251000,900,0,0
201003251000,1450,0,0
201003251000,1230,0,0
However, sometimes, the column will missing in the raw files:
e.g.
date,nomsgsent,nomsgdelay... (8 Replies)
Discussion started by: natalie23
8 Replies
4. Shell Programming and Scripting
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Discussion started by: Diya123
1 Replies
5. Shell Programming and Scripting
please help!!!!!!
I have a file .txt that has only one column like that:
34.1
35.5
35.6
45.6
...
Now, i want to add a column in the left in which the values of this column increase by 0.4 , for example:
0.0 34.1
0.4 35.5
0.8 35.6
1.2 45.6
How can i do with awk instructions??? ... (2 Replies)
Discussion started by: tienete
2 Replies
6. UNIX for Dummies Questions & Answers
Hi all !
If there is only one single value in a column (e.g. column 1 below), then return this value in the same output column.
If there are several values in the same column (e.g. column 2 below), then return the different values separated by "," in the output.
pipe-separated input:
... (11 Replies)
Discussion started by: lucasvs
11 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have a table as shown below. I want to concatenate values in col2 and col3 based on a value in col4.
1 X Y A
3 Y Z B
4 A W B
5 T W A
If col4 is A, then I want to concatenate col3 with itself. Otherwise it should concateneate col2 with col3.
1 X Y YY
3 Y Z YZ... (10 Replies)
Discussion started by: Gussifinknottle
10 Replies
8. Shell Programming and Scripting
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
9. Shell Programming and Scripting
Judi # cat File1
judi /export/home 76
judi /usr 83
judi #
judi # cat File2
judi /export/home 79
judi /usr 82
judi #
if COLUMN3 of File2 is greater that COLUMN3 of File1, then print File2's lines
juid /export/home 79
Code tags please (2 Replies)
Discussion started by: judi
2 Replies
10. Shell Programming and Scripting
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Discussion started by: as7951
1 Replies
LEARN ABOUT DEBIAN
html::formhandler::traitfor::i18n
HTML::FormHandler::TraitFor::I18N(3pm) User Contributed Perl Documentation HTML::FormHandler::TraitFor::I18N(3pm)
NAME
HTML::FormHandler::TraitFor::I18N - localization
VERSION
version 0.40013
language_handle, _build_language_handle
Holds a Locale::Maketext (or other duck_type class with a 'maketext' method) language handle. The language handle is used to localize the
error messages in the field's 'add_error' method. It's also used in various places in rendering to localize labels and button values, etc.
The builder for this attribute gets the Locale::Maketext language handle from the environment variable $ENV{LANGUAGE_HANDLE}:
$ENV{LANGUAGE_HANDLE} = HTML::FormHandler::I18N->get_handle('en_en');
...or creates a default language handler using HTML::FormHandler::I18N. You can pass in an existing Locale::MakeText subclass instance or
create one in a builder.
In a form class:
sub _build_language_handle { MyApp::I18N::abc_de->new }
Passed into new or process:
my $lh = MyApp::I18N::abc_de->new;
my $form = MyApp::Form->new( language_handle => $lh );
If you do not set the language_handle, then Locale::Maketext and/or I18N::LangTags may guess, with unexpected results.
You can use non-Locale::Maketext language handles, such as Data::Localize. There's an example of building a Data::Localize language handle
in t/xt/locale_data_localize.t in the distribution.
If you don't want a particular error message to go through localization, you can use 'push_errors' and 'push_form_errors' instead of
'add_error' and 'add_form_errors'.
Example of getting the language handle from the Catalyst context (where the Catalyst context is passed in with 'ctx'):
has '+language_handle' => ( builder => 'get_language_handle_from_ctx' );
sub get_language_handle_from_ctx {
my $self = shift;
return MyApp::I18N->get_handle(
@{ $self->ctx->languages } );
}
AUTHOR
FormHandler Contributors - see HTML::FormHandler
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Gerda Shank.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-25 HTML::FormHandler::TraitFor::I18N(3pm)