For example I have a file called fileNames.txt.  cat >fileNames returnsabetableabacusHow do I use fileNames to create abet, able, and abacus as .txt files?  I tried using pipes with cat and touch but I'm a beginner with this stuff so I don't really know what else to try.
How do I create files using the lines in a .txt file?
shell
There are numerous ways to do that, including the following (assuming GNU xargs):sed -e '/^[[:space:]]*$/d' -e 's/$/.txt/' fileNames.txt | xargs -rd '\n' touch --This assumes that there is only one filename per line in fileNames.txt.  The sed script deletes blank lines (thanks to @rubynorails) and adds '.txt' to the end of each filename before piping them to xargs touch.By using the -d '\n' option with xargs (a GNU extension, which tells xargs to use only newline or '\n' as the delimiter rather than any whitespace, and disables quote processing) this even copes with filenames that have spaces and other potentially-problematic characters (except for \n or newline itself).  e.g. if a line contained 'abet able', without -d '\n', two files (abet and able.txt) would be created.  With it, only one file abet able.txt will be created.