I have two files. File 'a' has contents:
1|1
2|2
3|3
4|4
and file 'b' has contents:
abc|def
hij|klm
nop|qrs
tuv|wxy
I would like to prepend file 'a' to file 'b' (with pipe) such that the contents of 'b' will be:
1|1|abc|def
2|2|hij|klm
3|3|nop|qrs
4|4|tuv|wxy (3 Replies)
I want to print out a directory listing, then append ] to the end of each line. I'm trying to create a list of Wiki links based on folder listings that i can just copy and paste without having to edit 100's of file listings.
Using sed i've figured out to do something like this:
sed... (4 Replies)
Currently I am redirecting STDERR and STDOUT to a log file by doing the following
{
My KSH script contents
} 2>&1 | $DEBUGLOG
Problem is the STDERR & STDOUT do not have any date/time associated.
I want this to be something that i can embed into a script opposed to an argument I use... (4 Replies)
Hi,
I have a process which outputs to a log.
Below is the code snippet:
process &> $LOGFILE&
The log file keeps on updating whenever a transaction is processed.
The log file has a time stamp added so every time I kill the process and start the process a new log file is... (4 Replies)
Hi,
I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Hi,
I have a files in a directory as below :-
ls -1
mqdepth-S1STC02
proc-mq-S1STC01
proc-mq-S1STC02
proc-mq-S1STC03
Whereever i have S1STC i need to copy them into new file with file name S2STC.
expected output :-
ls -1
mqdepth-S2STC02
proc-mq-S2STC01
proc-mq-S2STC02... (3 Replies)
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Hello,
Is possibly there a way to prepend the filename to its content without a third file? The reason is to add a header to each file contents to distinguish each other when they are pasted side-by-side.
sample.txt:
XLOC_001 0
XLOC_002 23
XLOC_003 4
XLOC_012 6output (with the same... (4 Replies)
Looking to add text to a file, example
File example;
nodegroups:
check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com
I need to take a file with a one line list of hosts separated by commas
host.domain.com,host2.domain.com,host3.domain.comand prepend the string " ... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies
LEARN ABOUT DEBIAN
dist::zilla::plugin::prepender
Dist::Zilla::Plugin::Prepender(3pm) User Contributed Perl Documentation Dist::Zilla::Plugin::Prepender(3pm)NAME
Dist::Zilla::Plugin::Prepender - prepend lines at the top of your perl files
VERSION
version 1.112280
SYNOPSIS
In your dist.ini:
[Prepender]
copyright = 0
line = use strict;
line = use warnings;
skip = t/data/.+.pl
skip = something-else-unnecessary
DESCRIPTION
This plugin will prepend the specified lines in each Perl module or program within the distribution. For scripts having a shebang line,
lines will be inserted just after it.
This is useful to enforce a set of pragmas to your files (since pragmas are lexical, they will be active for the whole file), or to add
some copyright comments, as the fsf recommends.
The module accepts the following options in its dist.ini section:
o copyright - whether to insert a boilerplate copyright comment. defaults to true.
o line - anything you want to add. may be specified multiple times. no default.
o skip - regexp of file names to not prepend to. may be specified multiple times. no default.
SEE ALSO
You can look for information on this module at:
o Search CPAN
http://search.cpan.org/dist/Dist-Zilla-Plugin-Prepender <http://search.cpan.org/dist/Dist-Zilla-Plugin-Prepender>
o See open / report bugs
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-Zilla-Plugin-Prepender <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-Zilla-Plugin-
Prepender>
o Mailing-list (same as Dist::Zilla)
<http://www.listbox.com/subscribe/?list_id=139292>
o Git repository
http://github.com/jquelin/dist-zilla-plugin-prepender <http://github.com/jquelin/dist-zilla-plugin-prepender>
o AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Dist-Zilla-Plugin-Prepender <http://annocpan.org/dist/Dist-Zilla-Plugin-Prepender>
o CPAN Ratings
http://cpanratings.perl.org/d/Dist-Zilla-Plugin-Prepender <http://cpanratings.perl.org/d/Dist-Zilla-Plugin-Prepender>
AUTHOR
Jerome Quelin
COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Jerome Quelin.
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.12.4 2011-08-27 Dist::Zilla::Plugin::Prepender(3pm)