If they are starting with foo then use: $file is the arbitrary variable in the for loop and each time it contains the name of the next foo file it finds in the current directory ..
Last edited by Scrutinizer; 04-07-2012 at 10:52 AM..
I'm working on a project that basically unzips three zip files.
When these unzip they create about 70+ directories with subdirectories of year/month with about 3 to 9 pdf files in each directory.
Basically, I'm needing to figure out a way to zip these pdf files up.
for instance the script... (1 Reply)
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)
what i need is that after passwordless enter another program should execute. I can succeed passwordless login but ı could not execute (./son) program. pls help me (6 Replies)
I have a file named Me_thread_spell.txt that I want to split into smaller files. I want it to be split in each place there is a ;;;. For example,
blah blah blah ;;;
blah bhlah hlabl
awasnceuir
asenduhfoijhacseiodnbfxasd;;;
oabwcuhaweoir;;;
This full file would be three separate files... (7 Replies)
Hi.
I don't have any experience with making scripts in bash. I need a simple script to rename all files in a folder to the format file1.avi, file2.avi, file3.avi, and so on.....
Please note that the original files have different filenames and different extensions. But they all need to be... (2 Replies)
Dear friends,
I have created a script to rename all files in a directory by appending the file name with username (who created the file), the date it was created. For example, "apple.doc" should be renamed to "johnFeb23apple.doc" where "john" is the owner and "Feb23" is file created date. It... (4 Replies)
:wall::wall::wall:
Hi I have horrible script below, need help in renaming ls -l output into new filename format:
Desired output:
cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename
localuser@localuser:~ vi... (3 Replies)
I am trying to use sed to rename all .txt files in /home/cmccabe/test. However, I am getting an error that I seems to be putting the files in a new directory s, instead of in the original. Thank you :).
bash
# rename classified
cd /home/cmccabe/test
pattern2_old="_classify"... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT DEBIAN
class::mixinfactory::hasafactory
MixinFactory::HasAFactory(3pm) User Contributed Perl Documentation MixinFactory::HasAFactory(3pm)NAME
Class::MixinFactory::HasAFactory - Delegates to a Factory
SYNOPSIS
package My::BaseClass;
@ISA = 'Class::MixinFactory::HasAFactory';
sub new { ... }
sub foo { return "Foo Bar" }
package My::Logging;
sub foo { warn "Calling foo"; (shift)->NEXT('foo', @_) }
package My::UpperCase;
sub foo { uc( (shift)->NEXT('foo', @_) ) }
package main;
use My::BaseClass;
print My::BaseClass->class()->new()->foo();
print My::BaseClass->class( 'Logging' )->new()->foo();
print My::BaseClass->class( 'UpperCase' )->new()->foo();
print My::BaseClass->class( 'Logging', 'UpperCase' )->new()->foo();
DESCRIPTION
A class for use by classes which want a factory method.
Inherit from this class to obtain the class() factory method, described below.
PUBLIC METHODS
mixin_factory()
BaseClass->mixin_factory() : $factory_object
Gets the associated mixin factory. Generated the first time it is needed.
class()
BaseClass->class( @mixins ) : $package_name
Calls the class() method on the associated mixin factory.
SEE ALSO
For a facade interface that facilitates access to this functionality, see Class::MixinFactory.
For distribution, installation, support, copyright and license information, see Class::MixinFactory::ReadMe.
perl v5.10.1 2009-12-10 MixinFactory::HasAFactory(3pm)