Let's say you have a bunch of OLSS packages that you downloaded and stored in /dload/olss/*.pkg, then you can do the following:
cd /dload/olss
find `pwd` -name "*pkg" -ok pkgadd -d {} \;
where
find <-- the command searches your mounted filesystems
`pwd` <-- is evaluated as your current directory
-name <-- tell find that your looking for a specific file(s)
"*pkg" <-- called splat pkg.
-ok <-- pipe those complete pathnames to to the next command
If and Only If the user presses the 'y' key after
each found file is displayed to stdout.
pkgadd -d <-- that's the package adding command
-d <-- tells pkgadd that the next arg will be the path to the pkg
{} <-- this is where find inserts the path it found one at a time
\; <-- Escaped semi means end of the line.
or from a bourne or korne shel
cd /dload/olss
for i in *.pkg
do
pkgadd -d `pwd`\$i
done
<mschalit@pacbell.net>
gerberb@zenez.com |