I am looking to pass a list of variables from a text file into a simple bash command. Essentially I have a list of all linux commands (commands.txt). I want to pass each command from that file (each is on a new line) to the man command and print each to a new .txt file so each variable would be passed to this:
man $command > $command.txt
so each variable would have its man page printed to its name .txt. Please help! I would like to do this in bash script but anything that will work would be appreciated.
Use built-in command
read: