The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 11-21-2008
elbrand elbrand is offline
Registered User
  
 

Join Date: Apr 2008
Location: Wolfenbuettel/Germany
Posts: 12
some comments

Code:
#! /bin/bash

TD=$(mktemp -d /tmp/xxxxxxxxx)         # create a temp-directory
ALL="${TD}/allfiles"                               # a filename for the output of find
REP=<Reporting system command>    # your command
trap "rm -Rf ${TD}" 0 1 2 3 9 13 15       # erase the temp directory at signal 0,1 etc.

cd ${TD}
find /etc -type f > ${ALL}                        # find and put all output in one file
split -l 100 ${ALL} "prfx-"                       # split this file into smaller files with 100 
                                                              # lines each (filenames start with "prfx-")
find . -name "prfx-*" -exec ${REP} {} \;  # find the "prfx-"-files and call your 
                                                              # command with them (I don't know
                                                              # how your command works)

exit 0