06-29-2010
Quote:
Originally Posted by
sholay
yes, i tried it. unfortunately, it isn't working.. After pressing enter, just the secondary prompt string came up and nothing happened..
Also, although i dont get ur code but as you used mv command, I should say again that i want to just copy them (not move).
Solaris10 does not support maxdepth as i saw after testing. You can use cp instead of mv, Bartus' command partly worked in my test environment.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to develop a makefile that spans across directories. For example, let's say i have an upper level directory (main) and about 2 subdirectories. I want my .cpp files and .o files to be in one subdirectory. I want my .a files to be in the other subdirectory. The .a files are made up of the... (0 Replies)
Discussion started by: benjie_asu
0 Replies
2. Shell Programming and Scripting
I cant remember how, i use to know but its been like 2 years since ive used shell can anyone help me? (7 Replies)
Discussion started by: kprescod4158
7 Replies
3. UNIX for Dummies Questions & Answers
Hi All
i want to write a script which could copy one file at a time from one directory to another directory.
Scenerio:
Let's say i have 100 file in a dirctory,so i want to copy one file at a time to another directory with a sleep statement in between that of 30 secs.
please help me... (1 Reply)
Discussion started by: Nikhilindurkar
1 Replies
4. Shell Programming and Scripting
Hello my friends,
I need to write a simple shell bad file :D that search and delete a file it's name 'Microsoft.txt' in the current directory and its subdirectories?
So can you help to guide me how i can write this shell, Just give me the beginning :o thank you. (1 Reply)
Discussion started by: Net-Man
1 Replies
5. UNIX for Dummies Questions & Answers
I'm trying to remove several directories which contains sun-dirs and files inside.
I used the command rm -r <dirname>
But, it always ask "examine file in directory <dirname> yes/no?" line by line.
So, i need to write "y" for every line.
How can i skip this step and remove all directories with... (9 Replies)
Discussion started by: ppa108
9 Replies
6. Shell Programming and Scripting
Hi,
I have a parent directory in which I have sub directories of different depth
/usr/usr1/user2/671
/usr/usr1/672
/usr/user2/user1/673
/usr/user2/user3/user4/674
And I need the names of all the directories that which starts only with 6 in a file.
Thanks, (12 Replies)
Discussion started by: arun_maffy
12 Replies
7. UNIX for Dummies Questions & Answers
I want to copy a file from the top directory into all the sub-folders and all of the sub-folders of those sub-folder etc. Does anyone have any idea how to do this?
Thanks in advance of any help you can give. (3 Replies)
Discussion started by: EinsteinMcfly
3 Replies
8. UNIX for Dummies Questions & Answers
Hi
I think this should be relatively simple but I can't figure it out. I have several files with the same name in different folders within a directory (the output of a program that I ran). Something like this:
./myAnalysis/item1/round1/myoutput.txt
./myAnalysis/item1/round2/myoutput.txt... (2 Replies)
Discussion started by: jullee
2 Replies
9. Shell Programming and Scripting
Below is the script i have but i would like simplified but still do the same job.
I need a script to copy files not directories or sub-directories into a existing or new directory. The files, if have the same name but different extension; for example 01.doc 01.pdf then only copy the .doc file. ... (1 Reply)
Discussion started by: Gilljambo
1 Replies
10. Shell Programming and Scripting
Hi All,
I need to copy files from one directory to another with the files to be renamed while copying if a file with the same name already exists in the target directory.
THanks,
Dev (2 Replies)
Discussion started by: dev.devil.1983
2 Replies
LEARN ABOUT DEBIAN
test::unit::procedural
Test::Unit::Procedural(3pm) User Contributed Perl Documentation Test::Unit::Procedural(3pm)
NAME
Test::Unit::Procedural - Procedural style unit testing interface
SYNOPSIS
use Test::Unit::Procedural;
# your code to be tested goes here
sub foo { return 23 };
sub bar { return 42 };
# define tests
sub test_foo { assert(foo() == 23, "Your message here"); }
sub test_bar { assert(bar() == 42, "I will be printed if this fails"); }
# set_up and tear_down are used to
# prepare and release resources need for testing
sub set_up { print "hello world
"; }
sub tear_down { print "leaving world again
"; }
# run your test
create_suite();
run_suite();
DESCRIPTION
Test::Unit::Procedural is the procedural style interface to a sophisticated unit testing framework for Perl that is derived from the JUnit
testing framework for Java by Kent Beck and Erich Gamma. While this framework is originally intended to support unit testing in an object-
oriented development paradigm (with support for inheritance of tests etc.), Test::Unit::Procedural is intended to provide a simpler inter-
face to the framework that is more suitable for use in a scripting style environment. Therefore, Test::Unit::Procedural does not provide
much support for an object-oriented approach to unit testing - if you want that, please have a look at Test::Unit::TestCase.
You test a given unit (a script, a module, whatever) by using Test::Unit::Procedural, which exports the following routines into your names-
pace:
assert()
used to assert that a boolean condition is true
create_suite()
used to create a test suite consisting of all methods with a name prefix of "test"
run_suite()
runs the test suite (text output)
add_suite()
used to add test suites to each other
For convenience, "create_suite()" will automatically build a test suite for a given package. This will build a test case for each subrou-
tine in the package given that has a name starting with "test" and pack them all together into one TestSuite object for easy testing. If
you dont give a package name to "create_suite()", the current package is taken as default.
Test output is one status line (a "." for every successful test run, or an "F" for any failed test run, to indicate progress), one result
line ("OK" or "!!!FAILURES!!!"), and possibly many lines reporting detailed error messages for any failed tests.
Please remember, Test::Unit::Procedural is intended to be a simple and convenient interface. If you need more functionality, take the
object-oriented approach outlined in Test::Unit::TestCase.
AUTHOR
Copyright (c) 2000-2002, 2005 the PerlUnit Development Team (see Test::Unit or the AUTHORS file included in this distribution).
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
o Test::Unit::TestCase
o the procedural style examples in the examples directory
perl v5.8.8 2006-09-13 Test::Unit::Procedural(3pm)