On Mon, 11 Mar 2024 20:26:40 +0000, Holger Levsen
<hol...@layer-acht.org> wrote:
>foo="bin1
>bin2
>bin3"
>
>$file=/some/path/to/bugreport_without_package_line.txt
>tmpfile=$(mktemp)
>
>for package in $foo ; do
>       ( echo "package: $package" ;
>         cat $file ) > $tmpfile
>       do mutt -s "RM: remove $package" -i tmpfile $package
>       sleep 15m
>done
>rm $tmpfile
>
>with 40 packages this is just a 10h running script ;)

A very nice example for Koehntopp's rule: "Verwende perl¹. shell will
man können, dann aber nicht verwenden"²

Greetings
Marc

¹ it would be python nowadays, the saying is 25 years old
² "Use perl. You want to know how to write shell scripts, but not
actually do it"
-- 
----------------------------------------------------------------------------
Marc Haber         |   " Questions are the         | Mailadresse im Header
Rhein-Neckar, DE   |     Beginning of Wisdom "     | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 6224 1600402

Reply via email to