whatprovides/db/list

22 lines
357 B
Bash

#!/bin/bash
alpha="$@"
apt install "${alpha}*" -y
pp=`apt list "${alpha}*" | cut -d'/' -f1`
for i in $pp;
do
echo $i
dpkg -L $i >> $i.raw
echo " Raw file has created"
sed "s/^/$i: /" $i.raw >> $i.ok
apt remove $i -y
done
rm *.raw
mkdir ${alpha}for
mv *.ok ./${alpha}for/
#while ;
#do
# apt remove $i -y
#done