[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run-parts man ?
- To: Ben-Nes Michael <miki(at-nospam)canaan.co.il>
- Subject: Re: run-parts man ?
- From: Tzafrir Cohen <tzafrir(at-nospam)technion.ac.il>
- Date: Sun, 8 Jul 2001 16:59:58 +0300 (IDT)
- cc: linux ILUG <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <008c01c107b4$247f1320$aa5796d4@canaan.co.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Sun, 8 Jul 2001, Ben-Nes Michael wrote:
> Hi All
>
> I sow "run-parts" in /etc/crontab, I guess it activate script script in
> directory but im not sure.
>
> I tried my man system and other on the web with no success.
>
> Any one know where I can find the run-parts man or what it does ?
>
> man -K "run-parts" didn't helped either :(
That is indeed a problem with the distro, but...
$ which run-parts
/usr/bin/run-parts
[tzafrir@canada1 Mozilla]$ file `which run-parts
$ file `which run-parts`
/usr/bin/run-parts: Bourne-Again shell script text executable
$ wc `which run-parts`
30 94 505 /usr/bin/run-parts
Doesn't look as if it would be too hard to grasp on your own. Anyway,
here's run-parts of my system:
--------
#!/bin/bash
# run-parts - concept taken from Debian
# keep going when something fails
set +e
if [ $# -lt 1 ]; then
echo "Usage: run-parts <dir>"
exit 1
fi
if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit 1
fi
for i in $1/* ; do
[ -d $i ] && continue
# Don't run [KS]??foo.{rpmsave,rpmorig,rpmnew} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue
if [ -x $i ]; then
$i
fi
done
-----------
So basically it runs all the executables from a given directory
--
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il