CPU Consumption comparision.

hi,

i hav a script which processes 1000 files one by one in every run jus for searching their corresponding output files at a given path, due to this my script runs for long time and taking more CPU,

can we have any way in which we can have this check at least 100 files in a single shot instead of one by one by a simple loop, and how will it affect the CPU consumption.

Thank You

Kindly repost in English, and with your script provided inside [code] tags.

In the below mentioned script :

[#!/bin/ksh
Home="/tmp/Text"
Path="/abc/def"
find $Path -mtime -1 -print | xargs ls -ld > $Home # Putting latest 24 hours files in $Home

cat $Home | while read line
do
File=$(echo $line|awk '{print $4}');

if [[ -f "$File.SP" ]]
then
echo " File $File is Correct"
else
echo "File $File is Missed"
fi
]

i am checking for the files which are received in last 24 hours( almost 1000 files) in my system and they have their corresponding ".SP" file generated, if not then its a MISS.
Here i am checking 1000 files one by one that their corresponding ".SP" is generated or not. can i have any way common by which i can put this check for more than a file at a time, to minimize the run time of the script?

i mean can we parallely run multiple checks like threading??

find /abc/def -not -name '*.SP' -exec ./helperscript.sh {} \;

helperscript.sh:

if [ -e $1.SP ]; then echo "File $1 is Correct"; else echo "File $1 is Missed"; fi

sir,

thank you so much for your help,

i am novice to unix, it would be great if you can tell me how i have to write it in my code.

i mean, can i call one script in other if yes how i have to that?

please give me an example

thanks again

At the risk of sounding flippant, why do you have the access or the requirement to do this task if you lack the expertise?