Sponsored Content
Top Forums Shell Programming and Scripting Find and move command with exec Post 302761111 by jonnyd on Friday 25th of January 2013 05:52:20 AM
Old 01-25-2013
brilliant thnx!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find command exec error

Hi All, i am writing a shell script in korn shell which deletes all the files in a directory once in every 10DAYS. the directory has different format files. the script has something like this; cd /home/data/pavi echo "Please Enter the Number of Days to search for" read DAYS... (2 Replies)
Discussion started by: pavan_test
2 Replies

2. UNIX for Advanced & Expert Users

Find command with prune and exec

Hi, I'm using the following command to get a list of files on the system. find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \; however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (1 Reply)
Discussion started by: Sebarry
1 Replies

3. UNIX for Dummies Questions & Answers

Find command with prune and exec options

Hi, I'm using the following command to get a list of files on the system. find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \; however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (2 Replies)
Discussion started by: Sebarry
2 Replies

4. Shell Programming and Scripting

find command with -exec

Hi People, I have a directory full of compressed files (.Z extention) In many of these files there is a string pattern (3800078163033) I want to find all file names which contain this string in their text. Regards, Abhishek (2 Replies)
Discussion started by: max29583
2 Replies

5. Shell Programming and Scripting

How to get the exit code of -exec in the find command

Hi I have a little problem with the find command in a script that I'm writing. The script should check if there are some files younger than 100 seconds and then syncronise them with rsync. My find command: find -type f -cmin -100 -exec rsync -a --delete directory1/ directory2/ When I... (8 Replies)
Discussion started by: oku
8 Replies

6. Shell Programming and Scripting

find command to use multiple -exec options

Hello All, Is there a way to make exec do a couple of operations on a single input from find? For example, find . -type d -exec ls -l "{}" ";" I would like to give the result of each "ls -l" in the above to a wc. Is that possible? I want to ls -l | wc -l inside exec. How do I... (1 Reply)
Discussion started by: prasanna1157
1 Replies

7. Shell Programming and Scripting

find command with -exec

Hi all, Please could someone help with the following command requirement. I basically need to find files NEWER than a given file and order the result on time. My attempt so far is as follows: find . -newer <file_name> -exec ls -lrt {} ;\ But I dont seem to get the right result... (12 Replies)
Discussion started by: jonnyd
12 Replies

8. UNIX for Dummies Questions & Answers

What does the '\' in find -exec command

Hi, I have two scripts that remove files. One works fine and is coded find -name "syst*" -mtime +1 -exec rm {} \; The other is almost the same - only thing missing is the '\'. On that script though I keep getting: rm syst1202.file ? etc Does the \ make that difference or is it a... (3 Replies)
Discussion started by: Grueben
3 Replies

9. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
Data::Dumper::Concise(3)				User Contributed Perl Documentation				  Data::Dumper::Concise(3)

NAME
Data::Dumper::Concise - Less indentation and newlines plus sub deparsing SYNOPSIS
use Data::Dumper::Concise; warn Dumper($var); is equivalent to: use Data::Dumper; { local $Data::Dumper::Terse = 1; local $Data::Dumper::Indent = 1; local $Data::Dumper::Useqq = 1; local $Data::Dumper::Deparse = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Sortkeys = 1; warn Dumper($var); } So for the structure: { foo => "bar baz", quux => sub { "fleem" } }; Data::Dumper::Concise will give you: { foo => "bar baz", quux => sub { use warnings; use strict 'refs'; 'fleem'; } } instead of the default Data::Dumper output: $VAR1 = { 'quux' => sub { "DUMMY" }, 'foo' => 'bar baz' }; (note the tab indentation, oh joy ...) If you need to get the underlying Dumper object just call "DumperObject". Also try out "DumperF" which takes a "CodeRef" as the first argument to format the output. For example: use Data::Dumper::Concise; warn DumperF { "result: $_[0] result2: $_[1]" } $foo, $bar; Which is the same as: warn 'result: ' . Dumper($foo) . ' result2: ' . Dumper($bar); DESCRIPTION
This module always exports a single function, Dumper, which can be called with an array of values to dump those values. It exists, fundamentally, as a convenient way to reproduce a set of Dumper options that we've found ourselves using across large numbers of applications, primarily for debugging output. The principle guiding theme is "all the concision you can get while still having a useful dump and not doing anything cleverer than setting Data::Dumper options" - it's been pointed out to us that Data::Dump::Streamer can produce shorter output with less lines of code. We know. This is simpler and we've never seen it segfault. But for complex/weird structures, it generally rocks. You should use it as well, when Concise is underkill. We do. Why is deparsing on when the aim is concision? Because you often want to know what subroutine refs you have when debugging and because if you were planning to eval this back in you probably wanted to remove subrefs first and add them back in a custom way anyway. Note that this -does- force using the pure perl Dumper rather than the XS one, but I've never in my life seen Data::Dumper show up in a profile so "who cares?". BUT BUT BUT ... Yes, we know. Consider this module in the ::Tiny spirit and feel free to write a Data::Dumper::Concise::ButWithExtraTwiddlyBits if it makes you happy. Then tell us so we can add it to the see also section. SUGARY SYNTAX
This package also provides: Data::Dumper::Concise::Sugar - provides Dwarn and DwarnS convenience functions Devel::Dwarn - shorter form for Data::Dumper::Concise::Sugar SEE ALSO
We use for some purposes, and dearly love, the following alternatives: Data::Dump - prettiness oriented but not amazingly configurable Data::Dump::Streamer - brilliant. beautiful. insane. extensive. excessive. try it. JSON::XS - no, really. If it's just plain data, JSON is a great option. AUTHOR
mst - Matt S. Trout <mst@shadowcat.co.uk> CONTRIBUTORS
frew - Arthur Axel "fREW" Schmidt <frioux@gmail.com> COPYRIGHT
Copyright (c) 2010 the Data::Dumper::Concise "AUTHOR" and "CONTRIBUTORS" as listed above. LICENSE
This library is free software and may be distributed under the same terms as perl itself. perl v5.16.2 2011-01-20 Data::Dumper::Concise(3)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy