I was making a shell script with that installs packages from a list. The code looks like this:apps=$(cat ./foo/bar/packages.txt)apt install $appsBut, I get the errorE: Command line option 'i' [from -info] is not understood in combination with the other options.The packages.txt looks like the following all on one line:accountsservice acl acpi-support acpid ...Thanks in advance!
apt - Command line option 'i' [from -info] is not understood in combination with the other options
apt;cat;parameter
The problem with a call like this is that bad data in the packages.txt file can cause breakage.In this case you have an entry in the file -info.  This means the command you are running will look likeapt install pkg1 pkg2 ... -info pkg10 pkg11 ...The -info will be interpreted as an option to the apt command.  It doesn't like this and so reports Command line option 'i' [from -info] is not understood.You can prevent words like this being interpreted by putting a -- before the installapt -- install $appsThe -- means no more options and so the -info will now be understood to be a package name.  This is a good thing to do when using unknown input.But you still need to fix your packages.txt file to remove the bad entry.