All...
I want to remove blank spaces in file . I just leraned that we can use
" cat <Input filename> | tr -s ‘ ‘ > <Target file name> "
i also know with SED we can replace a blank space by other character by
sed s/ /*/g filename.
Please let me know how can i do that by... (1 Reply)
Guys, I need some help... how can I remove the blank spaces between the lines below? (between the date and the hour fields)
21/05/07 00:05:00 99
21/05/07 00:10:01 99
21/05/07 00:15:00 99
21/05/07 00:20:00 99
21/05/07 00:25:00 99
I want to make the file... (4 Replies)
hello
how to remove blank spaces of a file with awk??
i´m trying
awk '{gsub(" ","",$0); print $0;}' filename.txt
but it answers
syntax error near line
first of all i did this for download from netbackup database jobs
privilege bpdbjobs -report -M sv88 -gdm -header |cut -c-1024... (4 Replies)
Hi,
I have this problem that there are blank spaces in my text file... i want to remove them
line 1
line 2
line 3
I want to remove the space between line 2 and line 3... I tried sed... it work but it prints the whole text file at the command prompt which i dont want....
sde i tried was... (4 Replies)
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
I have a file which has blank spaces($) and the blank spaces at the end of the file are not coming up while cutting the files.. please find the following file, desired output..
file1:
001_AHaris$$$$$020$$$$$$$$$
001_ATony$$$$$$030$$$$$$$$$
002_AChris$$$$$090$$$$$$$$$... (5 Replies)
hi
i have a file which store some data.the contents of my file is
data1:data2
data3:data4
i have a script which read this file
correct="$(cat /root/sh | cut -d: -f1)"
i used this syntax..please help me which syntax is used to remove blank spaces..then how to read this file.. (1 Reply)
Hello..
I have a text file. I want to remove all the blank spaces(except tab) from the file..
I tried using sed command as shown below
sed 's/ //g' file1
But the problem with the above command is that it also eliminates 'tab' which is between the columns..
For example if the contents... (7 Replies)
I have a file which contains data such as that shown below. How do i remove all the blcnak spaces, before, during and at the end of each line in one command?
300015, 58.0823212, 230.424728
300016, 58.2276459, 229.141602
300017, 58.7590027, 226.960846
... (9 Replies)
Hi Gurus,
Somebody can say me how to delete blank spaces and blank lines in a file unix, please.
Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies
LEARN ABOUT DEBIAN
text::csv::encoded::coder::encodeguess
Text::CSV::Encoded::Coder::EncodeGuess(3pm) User Contributed Perl Documentation Text::CSV::Encoded::Coder::EncodeGuess(3pm)NAME
Text::CSV::Encoded::Coder::EncodeGuess - Text::CSV::Encoded coder class using Encode::Guess
SYNOPSIS
use Text::CSV::Encoded coder_class => 'Text::CSV::Encoded::Coder::EncodeGuess';
use Spreadsheet::ParseExcel;
my $csv = Text::CSV::Encoded->new();
$csv->encoding( ['ucs2', 'ascii'] ); # guessing ucs2 or ascii?
$csv->encoding_to_combine('shiftjis');
my $excel = Spreadsheet::ParseExcel::Workbook->Parse( $file );
my $sheet = $excel->{Worksheet}->[0];
for my $row ( $sheet->{MinRow} .. $sheet->{MaxRow} ) {
my @fields;
for my $col ( $sheet->{MinCol} .. $sheet->{MaxCol} ) {
my $cell = $sheet->{Cells}[$row][$col];
push @fields, $cell->{Val};
}
$csv->combine( @fields ) or die;
print $csv->string, "
";
}
DESCRIPTION
This module is inherited from Text::CSV::Encoded::Coder::Encode.
USE
Except for 2 attributes, same as Text::CSV::Encoded::Coder::Encode.
encoding_in
$csv = $csv->encoding_in( $encoding_list_ref );
The accessor to an encoding for pre-parsing CSV strings. If no encoding is given, returns current $encoding, otherwise the object itself.
$encoding_list_ref = $csv->encoding_in()
When you pass a list reference, it might guess the encoding from the given list.
$csv->encoding_in( ['shiftjis', 'euc-jp', 'iso-20022-jp'] );
If it cannot guess the encoding, the first encoding of the list is used.
encoding
$csv = $csv->encoding( $encoding_list_ref );
$encoding_list_ref = $csv->encoding();
You can pass a list reference to this attribute only:
* For list data consumed by combine().
* For list reference returned by getline().
In other word, in "combine" and "print", it might guess an encoding for the passing list data. If it cannot guess the encoding, the first
encoding of the list is used.
SEE ALSO
Encode, Encode::Guess
AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::EncodeGuess(3pm)