I am trying to write a package install script for Ubntu which is based on apt-get with a list of packages as parameter (like xargs -a ./packages_list.txt sudo apt-get -y -f -m install or sudo apt-get -y -f -m install $(cat packages_list.txt)).
It might happen that one of the packages in the list in packages_list.txt can't be found by apt. In this case that package should be ignored but all other should be installed.
So what I expect e.g. from the command sudo apt-get -y -f -m install curl wget apt-transport-https xargs dos2unix vim is that if xargs can't be found/downloaded by apt, curl, wget, apt-transport-https, dos2unix and vim still get installed.
But what actually is happening that I get the message (in German) E: xargs kann nicht gefunden werden. ("E: xargs can't be found.") and the rest of the list, e.g. apt-transport-https, does not get installed.
My understanding is, that -m (or --ignore-missing) should prevent this behavior. But this is not the case.
So how can I achieve that all other packages in apt's parameter list still get installed?