Sponsored Content
Full Discussion: Problem using find and xargs
Top Forums Shell Programming and Scripting Problem using find and xargs Post 302191545 by quixote on Friday 2nd of May 2008 09:56:22 PM
Old 05-02-2008
Ygor: thanks! Yes, that does indeed work. Now all I have to do is figure out why.... Smilie

It seems to go down only one level. I.e. if I have subdirs /photos/sea/pacific and /photos/sea/atlantic it'll go through the pictures at the /photos level and the /photos/sea level, and make thumbnail dirs for those, but it ignores the next level, photos/sea/pacific or atlantic. (Not that this is an issue in real life, since I only have one subdir level.) Is that because of this part of the script
Quote:
DIR=$(dirname "$JPG")/thumbs
Thanks again!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find | xargs cat

Hai I just want to find a file *.txt in particular direcotry and display the file name puls the content. Do someone know hot to do this, thanks. I try : find test/ -name '*.txt' | xargs cat but It does'nt print out the file name, i want something below print out in my screen : test/1.txt... (4 Replies)
Discussion started by: asal_email
4 Replies

2. Solaris

Problem in using wildcard characters in xargs with find

Hi, Under my parent diectory I have directory named "Response" in many of its subfolders. I am interested to see all files with extention .pro in Response Directory. I am giving following command - find . -name "Response" -type d | xargs -i ls -lrt {}/*.pro but it is not giving result. ... (3 Replies)
Discussion started by: sanjay1979
3 Replies

3. Shell Programming and Scripting

find | xargs cat

Hi, I am having trouble getting a combination of commands to work. I need to traverse through all sub-directories of a certain directory and 'cat' the contents of a particular file in the sub-directories. The commands on their own work but when I combine them I get no output. The... (4 Replies)
Discussion started by: DownunderDave
4 Replies

4. Solaris

Piping results of 'ls' to 'find' using 'xargs'

I'm trying to get a count of all the files in a series of directories on a per directory basis. Directory structure is like (but with many more files): /dir1/subdir1/file1.txt /dir1/subdir1/file2.txt /dir1/subdir2/file1.txt /dir1/subdir2/file2.txt /dir2/subdir1/file1.txt... (4 Replies)
Discussion started by: MartynAbbott
4 Replies

5. UNIX for Dummies Questions & Answers

XARGS and FIND together

I am trying to delete files older than 60 days from a folder: find /myfolder/*.dat -mtime +60 -exec rm {} \; ERROR - argument list too long: find I can't just give the folder name, as there are some files that I don't want to delete. So i need to give with the pattern (*.dat). I can... (3 Replies)
Discussion started by: risshanth
3 Replies

6. Shell Programming and Scripting

find and xargs

hi, i've been trying to figure this weird error but I cannot seem to know why. I am using below find command: find . \( ! -name . -prune \) -type f -mtime +365 -print The above code returns no file because no files are really more then 365 days old. However, when I use xargs, its... (9 Replies)
Discussion started by: The One
9 Replies

7. Shell Programming and Scripting

Xargs + Find Help

Guys i want to run a command to list all directories that havn't been modified in over 548 days ( 1.5 yrs ). Id like to run a script to first print what the command finds ( so i get a list of the files pre move ... i have a script set for this : find /Path/Of\ Target/Directory/ -type d -mtime... (4 Replies)
Discussion started by: modulartention
4 Replies

8. UNIX for Dummies Questions & Answers

find/xargs/*grep: find multi-line empty "try-catch" blocks - eg, missing ; not in a commented block

How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases? This would seem to involve find, xargs, *grep, regex, etc. In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Discussion started by: lifechamp
0 Replies

9. Shell Programming and Scripting

xargs vs exec with find:

Hi All, i'm trying to create a tar of all the .txt files i find in my dir . I've used xargs to acheive this but i wanted to do this with exec and looks like it only archives the last file it finds . can some one advice what's wrong here : find . -type f -name "*.txt" -print0 | xargs -0... (9 Replies)
Discussion started by: Irishboy24
9 Replies

10. Shell Programming and Scripting

Help with find, xargs and awk

Hi, I want to find some files and then search for some lines in it with a particular pattern and then write those lines into a file. To do this I am using something like this from command prompt directly. cd /mdat/BVG find -name "stmt.*cl" -newer temp.txt | xargs -i awk '/BVG-/{print}' {} >... (7 Replies)
Discussion started by: Sandhya Harsh
7 Replies
MojoMojo::Formatter::TOC(3pm)				User Contributed Perl Documentation			     MojoMojo::Formatter::TOC(3pm)

   module_loaded
       Return true if the module is loaded.

NAME
MojoMojo::Formatter::TOC - generate table of contents DESCRIPTION
This formatter will replace "{{toc}}" with a table of contents, using HTML::GenToc. If you don't want an element to be included in the TOC, make it have "class="notoc"" METHODS
format_content_order The TOC formatter expects HTML input so it needs to run after the main formatter. Since comment-type formatters (order 91) could add a heading for the comment section, the TOC formatter will run with a priority of 95. format_content Calls the formatter. Takes a ref to the content as well as the context object. The syntax for the TOC plugin invocation is: {{toc M- }} # start from Header level M {{toc -N }} # stop at Header level N {{toc M-N }} # process only header levels M..N where M is the minimum heading level to include in the TOC, and N is the maximum level (depth). For example, suppose you only have one H1 on the page so it doesn't make sense to add it to the TOC; also, assume you and don't want to include any headers smaller than H3. The {{toc}} markup to achieve that would be: {{toc 2-3}} Defaults to 1-6. SEO-friendly anchors Anchors should be generated with SEO- (and human-) friendly names, i.e. out of the entire token text, instead of being numeric or reduced to the first word(s) of the token. In the spirit of http://seo2.0.onreact.com/top-10-fatal-url-design-mistakes, compare: http://beachfashion.com/photos/Pamela_Anderson#In_red_swimsuit_in_Baywatch vs. http://beachfashion.com/photos/Pamela_Anderson#in "Which one speaks your language more, which one will you rather click?" The anchor names generated are compliant with XHTML1.0 Strict. Also, per the HTML 4.01 spec, anchor names should be restricted to ASCII characters and anchors that differ only in case may not appear in the same document. In particular, an anchor name may be defined only once in a document (logically, because otherwise the user agent wouldn't know which #foo to scroll to). This is currently a problem with HTML::Toc v1.11, which doesn't have support for passing the already existing anchors to the "templateAnchorName" sub. assembleAnchorName http://search.cpan.org/dist/HTML-Toc/Toc.pod#templateAnchorName SEE ALSO
MojoMojo and Module::Pluggable::Ordered. AUTHORS
Dan Dascalescu, <http://dandascalescu.com> LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-05-23 MojoMojo::Formatter::TOC(3pm)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy