The following will do the job if run in the target directory; it works on my linux/bash/mawk system:
You may want to add the full path to the output as you did in your own example.
Hi,
yes thats wat I want with the full path. But the issue is that $FileName has first row as blank. I do not want that. So is there any way to avoid such blank row in the $FileName.
so i have hundreds of files named history.20071112.tar
(history.YYYYMMDD.tar)
and im looking to extract one file out of each archive called status_YYYYMMDDHH:MM.lis
here is what i have so far:
for FILE in `cat dirlist`
do
tar xvf $FILE ./status_*
done
dirlist is a text... (4 Replies)
Hi,
I have 20 files which have respective 50 lines with different values.
I would like to process each line of the 50 lines in these 20 files one at a time and do an average of 3rd field ($3) of these 20 files. This will be output to an output file.
Instead of using join to generate whole... (8 Replies)
hi everyone!
I already posted it in scripts, I'm sorry, it's doubled
I'd like to extract a single column from 5 different files and put them together in an output file. I saw a similar question for 2 input files, and the line of code workd very well, the code is:
awk 'NR==FNR{a=$2; next}... (1 Reply)
hi everyone!
I'd like to extract a single column from 5 different files and put them together in an output file. I saw a similar question for 2 input files, and the line of code workd very well, the code is:
awk 'NR==FNR{a=$2; next} {print a, $2}' file1 file2
I added the file3, file4 and... (10 Replies)
Hi,
I have several files that look like this:
File1.txt
Data1
Data2
Data20
File2.txt
Data1
Data5
Data10
File3.txt
Data1
Data2
Data17
File4.txt (6 Replies)
Hi Everyone,
I'm really new to all this so I'm really hoping someone can help. I have a directory with ~1000 lists from which I want to extract lines from and write to new files. For simplicity lets say they are shopping lists and I want to write out the lines corresponding to apples to a new... (2 Replies)
Hello there,
I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
consider the following is the contents of the file
cat 11.sql
drop procedure if exists hoop1 ;
Delimiter $$
CREATE PROCEDURE hoop1(id int)
BEGIN
END
$$
Delimiter ;
.
.
.
.
drop procedure if exists hoop2;
Delimiter $$
CREATE PROCEDURE hoop2(id int)
BEGIN
END
$$ (8 Replies)
Hey,
I have number of .tgz files and want to extract the file with the ending *results.txt from each one.
I have tried
for file in *.tgz; do tar --wildcards -zxf $file *results.txt; doneas well as
list=$(ls *.tgz)
for i in $list; do tar --wildcards -zxvf $i *.results.txt; done... (1 Reply)
Discussion started by: jfern
1 Replies
LEARN ABOUT DEBIAN
class::accessor::children::fast
Class::Accessor::Children::Fast(3pm) User Contributed Perl Documentation Class::Accessor::Children::Fast(3pm)NAME
Class::Accessor::Children::Fast - Faster, child-class/accessor generation
SYNOPSIS
BEFORE (WITHOUT THIS)
package MyClass::Foo;
use base qw( Class:Accessor::Fast );
__PACKAGE__->mk_ro_accessors(qw( jacob michael joshua ethan ));
package MyClass::Bar;
use base qw( Class:Accessor::Fast );
__PACKAGE__->mk_ro_accessors(qw( emily emma madison isabella ));
package MyClass::Baz;
use base qw( Class:Accessor::Fast );
__PACKAGE__->mk_ro_accessors(qw( haruka haruto miyu yuto ));
AFTER (WITH THIS)
package MyClass;
use base qw( Class::Accessor::Children::Fast );
__PACKAGE__->mk_child_ro_accessors(
Foo => [qw( jacob michael joshua ethan )],
Bar => [qw( emily emma madison isabella )],
Baz => [qw( haruka haruto miyu yuto )],
);
DESCRIPTION
This module automagically generates child classes which have accessor/mutator methods.
This module inherits "Class::Accessor::Fast" to make accessors.
METHODS
This module provides the following methods in addition to all methods provided by "Class::Accessor::Fast".
mk_child_accessors
MyClass->mk_child_accessors( Foo => @fields, ... );
This generates a child class named "MyClass::Foo" which have accessor/mutator methods each named in "@fields".
mk_child_ro_accessors
MyClass->mk_child_ro_accessors( Bar => @fields, ... );
This generates a child class named "MyClass::Bar" which have read-only accessors (ie. true accessors).
mk_child_wo_accessors
MyClass->mk_child_wo_accessors( Baz => @fields, ... );
This generates a child class named "MyClass::Baz" which have write-only accessor (ie. mutators).
SEE ALSO
Class::Accessor::Children
Class::Accessor::Fast
AUTHOR
Yusuke Kawasaki <http://www.kawa.net/>
COPYRIGHT AND LICENSE
Copyright (c) 2007 Yusuke Kawasaki. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
perl v5.10.0 2007-08-16 Class::Accessor::Children::Fast(3pm)