Beside Don's straight solution, an untested attempt to improve your attempt with sed
This goes all to stdout. To write back to the input files, use sed -i option.
Hi,
I need to write a shell script (ksh) to read contents starting at a specific location from one file and append the contents at specific location in another file. Please find below the contents of the source file that I need to read the contents from,
File 1
-----# more... (5 Replies)
I have a bunch of files named publish.php within subdirs. I need to append a line at the end of each file. I thought I could do it with find and echo like this:
find . -name publish.php -exec echo "<? include('path/to/file.php'); ?>" >> '{}' \;
but that appends the line to a file named {}... (2 Replies)
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
I have file called xx
Now i want to rename this file as xxYYYYMMDD_HHMIAM.xls
Here is my code..
export DATE1=`date +%Y%m%d`
mv xx xx$DATE1
This code renames as xxYYYYMMDD
Now how can i append HHMIAM at the end of the file?
Any help is appreciated... (3 Replies)
Hello, I wanted to append 'XYZ' at the end of the text file. How can i do this?
I searched the forums and i am not getting what i want. Any help is highly appreciated. Thanks (2 Replies)
Hi,
I have two files say file 1 file 2
File1
1
2
4
5
File 2
asdf
adf
How to get the ouput something like
asdf1
adf1
asdf2
adf2
asdf4
adf4
asdf5 (5 Replies)
hi,
i m having a group of files starting with name 'Itemdelete<timestamp>' .
my requirment is to append a blank line at the end of files ,using unix in all the Itemdelete* files with a single unix command without using scripts.can any body put some light to this requiremnt.
regards
Angel (4 Replies)
Hi Gurus,
Need help. I'm a beginner in Unix. I have a requirement, need to add or append newline (\n) character in file.
Sample Data:
1|Main|Test|~#
2|Main|Hello|~#
3|Main|Unix|~#
4|Main|File|~#Output:
1|Main|Test|~#
2|Main|Hello|~#
3|Main|Unix|~#
4|Main|File|~#\n -- append only... (13 Replies)
Discussion started by: Gouri Solleti
13 Replies
LEARN ABOUT DEBIAN
perlanet::trait::yamlconfig
Perlanet::Trait::YAMLConfig(3pm) User Contributed Perl Documentation Perlanet::Trait::YAMLConfig(3pm)NAME
Perlanet::Trait::YAMLConfig - configure Perlanet through a YAML configuration file
SYNOPSIS
package MyPerlanet;
extends 'Perlanet';
with 'Perlanet::Traits::YAMLConfig';
my $perlanet = MyPerlanet->new_with_config(
configfile => 'whatever.yml'
);
$perlanet->run;
DESCRIPTION
Allows you to move the configuration of Perlanet to an external YAML configuration file.
Example Configuration File
title: planet test
description: A Test Planet
url: http://planet.example.com/
author:
name: Dave Cross
email: dave@dave.org.uk
entries: 20
opml: opml.xml
page:
file: index.html
template: index.tt
feed:
file: atom.xml
format: Atom
cache_dir: /tmp/feeds
feeds:
- url: http://blog.dave.org.uk/atom.xml
title: Dave's Blog
web: http://blog.dave.org.uk/
- url: http://use.perl.org/~davorg/journal/rss
title: Dave's use.perl Journal
web: http://use.perl.org/~davorg/journal/
- url: http://www.oreillynet.com/pub/feed/31?au=2607
title: Dave on O'Reillynet
web: http://www.oreillynet.com/pub/au/2607
METHODS
THIRTY_DAYS
The default length of caching, if caching options are present in the configuration
get_config_from_file
Extracts the configuration from a YAML file
AUTHOR
Oliver Charles, <oliver.g.charles@googlemail.com>
COPYRIGHT AND LICENSE
Copyright (c) 2010 by Magnum Solutions Ltd.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2012-03-17 Perlanet::Trait::YAMLConfig(3pm)