Trying to fix some python error I accidentally ran pacman -Rncs python without thinking and it uninstalled like 500 packages that I need. Checking the contents of /var/log/pacman.log, I have a list of all the packages I uninstalled, which I'll attach here with a text file.
What is the easiest way I can go about reinstalling all these packages? My guess is to use some kind of linux command to grab only the name of the package on each line, and then I could use all those package names to make a new pacman command to reinstall them. How would I go about doing this?