Hello,
I have a excel file which has almost ten columns on the shared drive. I have to write a shell script to ftp that daily to unix server and then extract some columns from there and generate oracle standard text file. The columns should be in proper order and aligned properly, otherwise... (1 Reply)
FILE-1
USER username@foo.com
TOOLIN tool-a
TOOL2 tool-b
TOOL3 tool-c
TOOL4 tool-d
TOOL5 tool-e
USER username_2@foo.com
TOOLIN tool-e
TOOL2 tool-f
TOOL3 tool-c
TOOL4 tool-d
....
I need to take this file and generate a target XML file -
<access>
<managed>
... (3 Replies)
Hello,
I want to create a file whose content is multiple lines of strings.
The string has the following pattern:
aaaa/bbbb/A-B.txt
A is a variable ranges from A1 to A2
B is a variable ranges from B1 to B2
Any ideas?
Thanks. (17 Replies)
Hi,
I have the output (as below) which i want it to be in a table.
For e.g.
space utilization in PSE on path /logs is 0%
space utilization in PSE on path /logs/tuxedo/tuxlsp is 16%
space utilization in PSE on path /ldvarlsp/lsp/log is 37%
space utilization in PSE on path /home is 6%... (7 Replies)
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
hi,
i have a text file that looks like this!
i want to generate an excel sheet out of it, removing all the junk data except the addresses
that look like
. Arrow Electrical Services
Rotating Machinery, Electrical Contracting & Mining Specialists
Onsite maintenance, breakdown... (8 Replies)
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Hi guys,
I have a text file that states:
cat prod.hosts
11.29.130.14 host1 host1.test.com web17
11.29.130.15 host2 host2.test.com web18
11.29.130.16 host3 host3.test.com web19
I want a .csv file that states:
... (2 Replies)
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
LEARN ABOUT DEBIAN
file::slurp::unicode
File::Slurp::Unicode(3pm) User Contributed Perl Documentation File::Slurp::Unicode(3pm)NAME
File::Slurp::Unicode - Reading/Writing of Complete Files with Character Encoding Support
SYNOPSIS
use File::Slurp::Unicode;
my $text = read_file('filename', encoding => 'utf8');
my @lines = read_file('filename'); # utf8 is assumed if no encoding.
write_file('filename', { encoding => 'utf16' }, @lines);
# same as File::Slurp::write_file (ie. no encoding):
write_file('filename', { encoding => 'binary' }, @lines);
use File::Slurp::Unicode qw(slurp);
my $text = slurp('filename', encoding => 'latin1');
DESCRIPTION
This module wraps File::Slurp and adds character encoding support through the "encoding" parameter. It exports the same functions which
take all the same parameters as File::Slurp. Please see the File::Slurp documentation for basic usage; only the differences are described
from here on out.
read_file
Pass in an argument called "encoding" to change the file encoding. If no argument is passed in, UTF-8 encoding is assumed.
The special encoding 'binary' is interpreted to mean that there should be no decoding done to the data after reading it. This is pretty
much the same as calling "File::Slurp::read_file()" directly. This option is here only to make code which needs to read both binary and
text files look uniform.
write_file
Pass in an argument called "encoding" to change the file encoding. If no argument is passed in and no wide characters are present in the
output data, then no conversion will be done. If there are wide characters in the output data then UTF-8 encoding is assumed.
The special encoding 'binary' is interpreted to mean that there should be no encoding done to the data before writing. If you pass a wide
string (a string with Perl's internal 'utf8 bit' set) to "write_file" and set the encoding to 'binary' it will die with an appropriate
message. This is pretty much the same as calling "File::Slurp::write_file()" directly. This option is here only to make code which needs
write both binary and text files look uniform.
SEE ALSO
File::Slurp
BUGS
None known. Contact author or file a bug report on CPAN if you find any.
COPYRIGHT
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright (C) 2010 David Caldwell
AUTHOR
David Caldwell <david@porkrind.org>
<http://porkrind.org/>
PROJECT HOME
<http://github.com/caldwell/File-Slurp-Unicode>
perl v5.10.1 2010-10-28 File::Slurp::Unicode(3pm)