Hi,
I have attempted to backup some database files on my company's Solaris machine about 3 times now. Each time that I attempt the backup, about 6 files are evident on the dat tape when I do read of the media and then I see the dreaded "tar: write error unexpected EOF" message. Each time that I... (2 Replies)
I have datafile like
~dta.yunm
shhshsgggssssjsksjs
sggsjshsjsjssss
shshshhshshshs
i wish to take only first line and all other lines in concatenated form in second line what should I do???
output like
~dta.yunm
shhshsgggssssjsksjssggsjshsjsjssssshshshhshshshs
please tell me how... (7 Replies)
Hi Ladies and Gents,
Explanation of my question with an example:
Let's consider the script: backup_every_hour.sh
#!/bin/bash
rsync -auv $dir $backup_dir >> backup_every_hour_script.log
Each time this script is called there will be a new entry at the end of the file... (1 Reply)
Hello Everyone,
I need a help from experts of this community regarding one of the issue that I am facing with shell scripting.
My requirement is to append char's at the end of each line of a file. The char that will be appended is variable and will be passed through command line.
The... (20 Replies)
Hai
#!user/bin/perl
--------
--------
print("$line.......\n");
-------
------
I want to write inside $line into a file like run.log
How i can pleasw tel me
Thanks
kiran (4 Replies)
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Hello all,
How can I find out the start and end of the writing file in the directory or recording time for writing file?
I have a directory where small ~ 1*MB temporary files are written.
After the end of the record, they are retrieved and erased.
I can only find out that the files are... (4 Replies)
Discussion started by: mrAibo
4 Replies
LEARN ABOUT CENTOS
tap::parser::yamlish::writer
TAP::Parser::YAMLish::Writer(3) User Contributed Perl Documentation TAP::Parser::YAMLish::Writer(3)NAME
TAP::Parser::YAMLish::Writer - Write YAMLish data
VERSION
Version 3.28
SYNOPSIS
use TAP::Parser::YAMLish::Writer;
my $data = {
one => 1,
two => 2,
three => [ 1, 2, 3 ],
};
my $yw = TAP::Parser::YAMLish::Writer->new;
# Write to an array...
$yw->write( $data, @some_array );
# ...an open file handle...
$yw->write( $data, $some_file_handle );
# ...a string ...
$yw->write( $data, $some_string );
# ...or a closure
$yw->write( $data, sub {
my $line = shift;
print "$line
";
} );
DESCRIPTION
Encodes a scalar, hash reference or array reference as YAMLish.
METHODS
Class Methods
"new"
my $writer = TAP::Parser::YAMLish::Writer->new;
The constructor "new" creates and returns an empty "TAP::Parser::YAMLish::Writer" object.
Instance Methods
"write"
$writer->write($obj, $output );
Encode a scalar, hash reference or array reference as YAML.
my $writer = sub {
my $line = shift;
print SOMEFILE "$line
";
};
my $data = {
one => 1,
two => 2,
three => [ 1, 2, 3 ],
};
my $yw = TAP::Parser::YAMLish::Writer->new;
$yw->write( $data, $writer );
The $output argument may be:
o a reference to a scalar to append YAML to
o the handle of an open file
o a reference to an array into which YAML will be pushed
o a code reference
If you supply a code reference the subroutine will be called once for each line of output with the line as its only argument. Passed lines
will have no trailing newline.
AUTHOR
Andy Armstrong, <andy@hexten.net>
SEE ALSO
YAML::Tiny, YAML, YAML::Syck, Config::Tiny, CSS::Tiny, <http://use.perl.org/~Alias/journal/29427>
COPYRIGHT
Copyright 2007-2011 Andy Armstrong.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.3 2013-05-02 TAP::Parser::YAMLish::Writer(3)