[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Shell script to call apt-get install --reinstall



I am trying to call a shell script to reinstall all packages.  I have a file
that lists all installed packages called "file".  The problem is when I call the
script it just goes by saying it couldn't find the package.
Here is the script.

#!/bin/bash

cat file | (IFS=" " ; while read prog; do apt-get install --reinstall $prog; done)

Thanks
Josh
-- 
Linux, the choice                | Pedaeration, n.:  The perfect body heat
of a GNU generation       -o)    | achieved by having one leg under the  sheet
Kernel 2.4.9-ac12          /\    | and one hanging off the edge of the bed.   
on a i586                 _\_v   | -- Rich Hall, "Sniglets" 
                                 | 



Reply to: