Sponsored Content
Full Discussion: Why doesn't this work?
Top Forums UNIX for Dummies Questions & Answers Why doesn't this work? Post 302755223 by RudiC on Saturday 12th of January 2013 09:28:12 AM
Old 01-12-2013
Running a shell, i.e. creating a new process for each file found may work well on small file counts, but would not be that efficient on large dir trees.
What about using the (deprecated) -path test as Corona688 proposed, execing a mv -t "$dir01"/.LogFiles/ (option -t not present on all systems), followed by a + that collects all filenames found into the mv parameters? Like:
Code:
find . -ipath '*/05_scripts/*.aep Logs'  -exec echo mv -t "$dir01"/.LogFiles/ {} +

. Give it a shot and report results!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

3. Shell Programming and Scripting

ls -d doesn't work on Solaris

Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d Anyone have the same problem and find a resolve? Thanks BobK (9 Replies)
Discussion started by: bobk544
9 Replies

4. UNIX for Dummies Questions & Answers

lp -o <option> doesn't work

why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies

5. Shell Programming and Scripting

awk -v -- Why doesn't my example work?

Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing: foreach num ( 6 5 4 ) awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}' end I would expect the following output: ... (3 Replies)
Discussion started by: treesloth
3 Replies

6. Shell Programming and Scripting

alias doesn't work

Hi I have put alias ll='ls -la' in .profile file but it doesn't work. On hand it works it looks like the .profile file is not beeing read. How to check whitch file is loaded? ,profile? .bash_profile? My system: SunOS mion 5.10 Generic Shell: /bin/pfksh Thanks (2 Replies)
Discussion started by: miojamo
2 Replies

7. Shell Programming and Scripting

if condition doesn't work

i want to get the value for column 4rth when i =4. please guide what i am doing wrong. thanks var=`cat file.csv` for i in $var; do { if ; then var4=$var4+$i fi echo $i } done I am geting this error message "0403-009 The specified number is not valid for this command." (8 Replies)
Discussion started by: sagii
8 Replies

8. HP-UX

Sudo doesn't work

I edited sudoers like this:vi /etc/sudoers subex ALL =(root) NOPASSWD: /usr/ccs/bin/pstack But the respective user still is prompted for password, and even when the right password is used, the command is still not launched.$sudo usr/ccs/bin/pstack 26557 We trust you have received the usual... (5 Replies)
Discussion started by: black_fender
5 Replies

9. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
Easy(3pm)						User Contributed Perl Documentation						 Easy(3pm)

NAME
MooseX::Log::Log4perl::Easy - A role for easy usage of logging in your Moose based modules based on MooseX::Log::Log4perl SYNOPSIS
package MyApp; use Moose; use Log::Log4perl qw(:easy); with 'MooseX::Log::Log4perl::Easy'; BEGIN { Log::Log4perl->easy_init(); } sub foo { my ($self) = @_; $self->log_debug("started bar"); ### logs with default class catergory "MyApp" $self->log_info('bar'); ### logs an info message $self->log('AlsoPossible')->fatal("croak"); ### log } DESCRIPTION
The Easy logging role based on the MooseX::Log::Log4perl logging role for Moose directly adds the logmethods for all available levels to your class instance. Hence it is possible to use $self->log_info("blabla"); without having to access a separate log attribute as in MooseX::Log::Log4perl; In case your app grows and you need more of the super-cow powers of Log4perl or simply don't want the additional methods to clutter up your class you can simply replace all code "$self->log_LEVEL" with "$self->log->LEVEL". You can use the following regex substitution to accomplish that: s/log(_(trace|debug|info|warn|error|fatal))/log->$2/g ACCESSORS
logger See MooseX::Log::Log4perl log See MooseX::Log::Log4perl log_fatal ($msg) Logs a fatal message $msg using the logger attribute. Same as calling $self->logger->fatal($msg) log_error ($msg) Logs an error message using the logger attribute. Same as calling $self->logger->error($msg) log_warn ($msg) Logs a warn message using the logger attribute. Same as calling $self->logger->warn($msg) log_info ($msg) Logs an info message using the logger attribute. Same as calling $self->logger->info($msg) log_debug ($msg) Logs a debug message using the logger attribute. Same as calling $self->logger->debug($msg) log_trace ($msg) Logs a trace message using the logger attribute. Same as calling $self->logger->trace($msg) SEE ALSO
MooseX::Log::Log4perl, Log::Log4perl, Moose BUGS AND LIMITATIONS
Please report any bugs or feature requests to "bug-moosex-log4perl@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. Or come bother us in "#moose" on "irc.perl.org". AUTHOR
Roland Lammel "<lammel@cpan.org>" Inspired by suggestions by Michael Schilli "<m@perlmeister.com>" Contributions from Tim Bunce "<TIMB@cpan.org>" LICENSE AND COPYRIGHT
Copyright (c) 2008-2012, Roland Lammel "<lammel@cpan.org>", http://www.quikit.at This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.14.2 2012-06-27 Easy(3pm)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy