10-11-2016
Did you consider find's -name test? And, tests and actions can be grouped to fulfill complex tasks with find.
BTW, 31 days is way more than 3 weeks.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I'm trying to figure out a way to delete empty files in a directory. I have a cron that runs and creates a flat file every 15 mins. However, most times at night the flat file will be empty.
I'd like to run a script to delete empty files that end with *.dat
Any suggestions?
Rich (1 Reply)
Discussion started by: rpnuge
1 Replies
2. Shell Programming and Scripting
Hi,
I have the following task to perform using shell script.
The user will provide a directory name along with a date. The script will delete all the files in the specified directory that was created earlier to that date. Also it should display the number of files that has been deleted.
... (7 Replies)
Discussion started by: theguy16
7 Replies
3. Shell Programming and Scripting
Hi all, new to the threads as well as Unix/Linux. I need to create a script that will delete any temporary files as well as check the files on the system for errors or corruption. This is what I have so far and I'm sure that I'm missing things or have the wrong commands. I'm not sure where to go... (3 Replies)
Discussion started by: Bwood1377
3 Replies
4. Shell Programming and Scripting
i want to delete all the files in my directory except the latest one. i need to do this from shell script.
say i have
a.txt - latest file
b.txt,
c.txt..
it should delete all the files except a.txt? (4 Replies)
Discussion started by: krishnarao
4 Replies
5. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
6. Shell Programming and Scripting
HI all,
I want to script where all the server names will be in a text file like
server1
server2
server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies
7. Shell Programming and Scripting
Hi,
I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is
# echo $0
-sh
My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies
8. Shell Programming and Scripting
Hi All,
Thanks in Advance
I wrote the following code
if
then
echo "version is 1.1"
for i in "subscriber promplan mapping dedicatedaccount faflistSub faflistAcc accumulator pam_account"
do
FILE="SDP_DUMP_$i.csv"
echo "$FILE"
... (5 Replies)
Discussion started by: aealexanderraj
5 Replies
9. Shell Programming and Scripting
Hello,
we have more than 100000 files in a directory which are write-protected regular file, these files are quite old and would like to delete them completely, Kindly let me know the command or peice of code to automate the process.
The filenames are like below
MPNT_... (6 Replies)
Discussion started by: Hadoop_Master
6 Replies
10. Shell Programming and Scripting
Hello,
I am new to shell scripting, need help,
my requirement is to delete the ip address from serveral files,
please suggest (2 Replies)
Discussion started by: manoj.solaris
2 Replies
LEARN ABOUT DEBIAN
test::useallmodules
Test::UseAllModules(3pm) User Contributed Perl Documentation Test::UseAllModules(3pm)
NAME
Test::UseAllModules - do use_ok() for all the MANIFESTed modules
SYNOPSIS
# basic usage
use strict;
use Test::UseAllModules;
BEGIN { all_uses_ok(); }
# if you also want to test modules under t/lib
use strict;
use Test::UseAllModules under => qw(lib t/lib);
BEGIN { all_uses_ok(); }
# if you have modules that'll fail use_ok() for themselves
use strict;
use Test::UseAllModules;
BEGIN {
all_uses_ok except => qw(
Some::Dependent::Module
Another::Dependent::Module
^Yet::Another::Dependent::.* # you can use regex
)
}
DESCRIPTION
I'm sick of writing 00_load.t (or something like that) that'll do use_ok() for every module I write. I'm sicker of updating 00_load.t when
I add another file to the distro. This module reads MANIFEST to find modules to be tested and does use_ok() for each of them. Now all you
have to do is update MANIFEST. You don't have to modify the test any more (hopefully).
EXPORTED FUNCTION
all_uses_ok
Does Test::More's use_ok() for every module found in MANIFEST. If you have modules you don't want to test, give those modules or some regex
rules as the argument. The word 'except' is ignored as shown above.
As of 0.11, you can also test modules under arbitrary directories by providing a directory list at the loading time (the word 'under' is
ignored as shown above). Modules under the lib directory are always tested.
PROTECTED FUNCTION
_get_module_list
Returns module paths to test. This function will not be exported. If you want to use this (see below), you always need to call it by the
full qualified name.
NOTES
As of 0.03, this module calls BAIL_OUT of Test::More if any of the use_ok tests should fail. (Thus the following tests will be ignored.
Missing or unloadable modules cause a lot of errors of the same kind.)
As of 0.12, you can add extra tests before/after all_uses_ok() if you explicitly declare test plan like this.
use strict;
use warnings;
use Test::More;
use Test::UseAllModules;
use Test::NoWarnings;
plan tests => Test::UseAllModules::_get_module_list() + 1;
all_uses_ok();
# and extra nowarnings test
SEE ALSO
There're several modules like this on the CPAN now. Test::Compile and a bit confusing Test::LoadAllModules try to find modules to test by
traversing directories. I'm not a big fun of them as they tend to find temporary or unrelated modules as well, but they may be handier
especially if you're too lazy to update MANIFEST every time.
AUTHOR
Kenichi Ishigaki, <ishigaki@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Kenichi Ishigaki
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2009-05-27 Test::UseAllModules(3pm)