Sponsored Content
Top Forums Shell Programming and Scripting How to append in the beginning not at the end? Post 302918525 by pilnet101 on Wednesday 24th of September 2014 01:58:57 AM
Old 09-24-2014
Have you tried using the forum's search functionality?

Just doing a quick search myself I can see numerous results which relate to this question.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cat a file from end to beginning

Is there an option, for cat, head, tail, or is there any way, to display a file from last line to first? For example, my file looks like this: aaaa bbbb cccc eeee and I would like to print or display it like this: eeee cccc bbbb aaaa thanks (5 Replies)
Discussion started by: jpprial
5 Replies

2. Shell Programming and Scripting

Append (cat) to beginning of file ?

Hi, Fairly new to unix scripting, hoping to get some help. using AIX v5 Basically I have 3 files 1). Header record 2). many detail record 3). Trailer record My desired result is 1 file which contains Heaeder, Detail, Trailer Currenty I am using a series of: ... (8 Replies)
Discussion started by: CBZ
8 Replies

3. UNIX for Dummies Questions & Answers

Append to beginning of a file

Hi, I have a file x which is being upated continuously. I want to add file y in the file x but at the beginning of file x. file x file y After commands file x eeee aaaa aaaa gggg bbbb bbbb hhhh... (2 Replies)
Discussion started by: baanprog
2 Replies

4. Shell Programming and Scripting

Remove comma and next rows beginning from the end

Hello friends, I have a file which consists of many rows, I use a couple of commands to convert it so i can use in a database query for filtering. I need the first columns (msisdns) in a row, seperated with commas, 9855162267,4,5,2010-11-03 17:02:07.627 9594567938f,5,5,2010-11-02... (9 Replies)
Discussion started by: EAGL€
9 Replies

5. Shell Programming and Scripting

Append variable texts to the beginning of each line in all files in a directory

I am writing a code to append some numbers in the beginning of each line in all the files present in a directory. The number of files are really huge. The files are numbered as 1.sco, 2.sco, 4.sco (Note: 3.sco is missing). The files currently look like this: 1.sco 2 3 5 6 6 7My task is to... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

6. Shell Programming and Scripting

Append file name to the beginning of each line

I want to append file names at the beginning of a line for each row file content abc.txt.gz 123|654|987 bcd.txt.gz 876|trf|kjh I want a single output file with below format abc.txt.gz|123|654|987 bcd.txt.gz|876|trf|kjh This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies

7. Shell Programming and Scripting

Append Multiple files with file name in the beginning of line

Hi, I have multiple files having many lines like as bvelow: file Name a.txt abc def def xyz 123 5678 file Name b.txt abc def def xyz 123 5678 I would like to append files in the below format to a new file: file Name c.txt (7 Replies)
Discussion started by: rramkrishnas
7 Replies

8. Shell Programming and Scripting

Removing hyphen from beginning and end of a word only.

It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this: For example, apple -orange tree pipe- banana-shake dupe- What my output should look like: apple orange tree... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

9. Shell Programming and Scripting

How to Append data to the content at the beginning of a variable?

Hi Guys, IF i have to append data to a variable, i simply use the following. What can i do to append data to the beginning? VAR+="data" (6 Replies)
Discussion started by: srkmish
6 Replies
EBook::Tools::EReader(3pm)				User Contributed Perl Documentation				EBook::Tools::EReader(3pm)

NAME
EBook::Tools::EReader - Palm::PDB handler for manipulating the Fictionwise/PeanutPress eReader format. SYNOPSIS
use EBook::Tools::EReader; my $pdb = EBook::Tools::EReader->new(); $pdb->Load('myfile-er.pdb'); print "Loaded '",$pdb->{title},"' by ",$pdb->{author}," "; my $html = $pdb->html; my $pml = $pdb->pml $pdb->write_unknown_records DEPENDENCIES
o "Compress::Zlib" o "Image::Size" o "P5-Palm" CONSTRUCTOR
"new()" Instantiates a new Ebook::Tools::EReader object. ACCESSOR METHODS
"filebase" In scalar context, this is the basename of the object attribute "filename". In list context, it actually returns the basename, directory, and extension as per "fileparse" from File::Basename. "footnotes()" Returns a hash containing all of the footnotes found in the file, where the keys are the footnote ids and the values contain the footnote text. "footnotes_pml()" Returns a string containing all of the footnotes in a form suitable to append to the end of PML text output. This is called as part of "pml()". "footnotes_html()" Returns a string containing all of the footnotes in a form suitable to append to the end of HTML text output. This is called as part of "html()". "pml()" Returns a string containing the entire original document text in its original encoding, including all sidebars and footnotes. "html()" Returns a string containing the entire document text (including all sidebars and footnotes) converted to HTML. Note that the PML text is stored in the object (and thus retrieving it is very fast), but generating the HTML output requires that the text be converted every time this method is used, consuming extra processing time. "sidebars()" Returns a hash containing all of the sidebars found in the file, where the keys are the sidebar ids and the values contain the sidebar text. "sidebars_pml()" Returns a string containing all of the sidebars in a form suitable to append to the end of PML text output. This is called as part of "pml()". "sidebars_html()" Returns a string containing all of the sidebars in a form suitable to append to the end of HTML text output. This is called as part of "html()". "write_html($filename)" Writes the raw book text to disk in PML form (including all sidebars and footnotes) with the given filename. If $filename is not specified, writes to "$self-"filebase> with a ".html" extension. Returns the filename used on success, or undef if there was no text to write. "write_images()" Writes each image record to the disk. Returns a list containing the filenames of all images written, or undef if none were found. "write_pml($filename)" Writes the raw book text to disk in PML form (including all sidebars and footnotes) with the given filename. If $filename is not specified, writes to "$self-"filebase> with a ".pml" extension. Returns the filename used on success, or undef if there was no text to write. "write_unknown_records()" Writes each unidentified record to disk with a filename in the format of 'raw-record-####', where #### is the record number (not the record ID). Returns the number of records written. MODIFIER METHODS
"Load($filename)" Sets "$self-"{filename}> and then loads and parses the file specified by $filename, calling "ParseRecord(%record)" on every record found. "ParseRecord(%record)" Parses PDB records, updating the object attributes. This method is called automatically on every database record during "Load()". "ParseRecord0($data)" Parses the header record and places the parsed values into the hashref "$self->{header}". Returns the hash (not the hashref). PROCEDURES
"cp1252_to_pml()" An unfinished and completely nonfunctional procedure to convert Windows-1252 characters to PML a codes. DO NOT USE. "pml_to_html($text,$filebase)" Takes as input a text string in Windows-1252 encoding containing PML markup codes and returns a string with those codes converted to UTF-8 HTML. Requires a second argument $filebase to specify the basename of the file (or specifically, the basename of the file to which output text will be written) so that image links can be generated correctly. BUGS AND LIMITATIONS
o HTML conversion doesn't handle handle the T command used to indent. o HTML conversion may be suboptimal in many ways. Most notably, most linebreaks are handled as <br />, and without any heed to whether those linebreaks occur inside of some other element. Validation is extremely unlikely. AUTHOR
Zed Pobre <zed@debian.org> LICENSE AND COPYRIGHT
Copyright 2008 Zed Pobre Licensed to the public under the terms of the GNU GPL, version 2 perl v5.10.1 2012-01-05 EBook::Tools::EReader(3pm)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy