Hi Unix gurus
This is my first post here. I have a file which looks like this:
string1,string2
,string3
,string4
...
...
I need to append all words below first line to the first line, ie
string1,string2,string3,string4,...
Bear in mind that it is not known how many lines follow... (11 Replies)
How to append constant No of spaces suppose 52 at end of each line in a file (xyz) excluding first and last line.
Please Help me out for the same. (1 Reply)
-Hi
I have multiple files which contain a line with the word "exec". I need to add the following pattern " -cmode -ccheap" on the same line where "exec" is at the end. Any idea? Thanks a lot in advance to everybody... -A (2 Replies)
hi i have a file like (every string contains 16 chars)
CTL1330000000000
0000 00
008000
0080000000
i need to form a line and write to a file
CTL13300000000000000 00008000 0080000000
total chars should be 64
... (2 Replies)
Hi,
I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is.
I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
I've scoured the internet with mixed results. As an amateur I turn to the great minds here.
I have a text file of 80 or so lines. I want to add ".pdf" to the end of each line. (For now that's it)
Most of the internet points toward using "sed". I don't know coding but can figure things out... (4 Replies)
After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh.
Now I've gotten the sed... (2 Replies)
Hello, could you please help with this one. I have an input file like this:
123,4567,89000
123456789,9876543,12
and for the output I need strings to be with the fixed length, let's say 15, and if the string is -lt 15 to be populated with blanks at the end until it reach 15, like this:
123 ,4567... (1 Reply)
Hi ,
I have pipe delimited file containing 12 columns having below data in AIX
Input :
A|B|C|D|E|F|G|H|I|J|K|L^M
A1|B1|C1|D1|E1^M
A2|B2|C2^M
So in first row i have 11 pipes which is fine.
In second row I have 4 pipes, so additional 7 pipes should get append
In third row I have 2... (3 Replies)
Discussion started by: sonu_pal
3 Replies
LEARN ABOUT MOJAVE
perlio::eol5.18
eol(3) User Contributed Perl Documentation eol(3)NAME
PerlIO::eol - PerlIO layer for normalizing line endings
VERSION
This document describes version 0.14 of PerlIO::eol, released December 18, 2006.
SYNOPSIS
binmode STDIN, ":raw:eol(LF)";
binmode STDOUT, ":raw:eol(CRLF)";
open FH, "+<:raw:eol(LF-Native)", "file";
binmode STDOUT, ":raw:eol(CRLF?)"; # warns on mixed newlines
binmode STDOUT, ":raw:eol(CRLF!)"; # dies on mixed newlines
use PerlIO::eol qw( eol_is_mixed );
my $pos = eol_is_mixed( "mixed
string
" );
DESCRIPTION
This layer normalizes any of "CR", "LF", "CRLF" and "Native" into the designated line ending. It works for both input and output handles.
If you specify two different line endings joined by a "-", it will use the first one for reading and the second one for writing. For
example, the "LF-CRLF" encoding means that all input should be normalized to "LF", and all output should be normalized to "CRLF".
By default, data with mixed newlines are normalized silently. Append a "!" to the line ending will raise a fatal exception when mixed
newlines are spotted. Append a "?" will raise a warning instead.
It is advised to pop any potential ":crlf" or encoding layers before this layer; this is usually done using a ":raw" prefix.
This module also optionally exports a "eol_is_mixed" function; it takes a string and returns the position of the first inconsistent line
ending found in that string, or 0 if the line endings are consistent.
The "CR", "LF", "CRLF" and "NATIVE" constants are also exported at request.
AUTHORS
Audrey Tang <autrijus@autrijus.org>.
Janitorial help by Gaal Yahas <gaal@forum2.org>.
Inspired by PerlIO::nline by Ben Morrow, <PerlIO-eol@morrow.me.uk>.
COPYRIGHT
Copyright 2004-2006 by Audrey Tang <audreyt@audreyt.org>.
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.18.2 2006-12-15 eol(3)