This is not a direct answer to your question, but if you want to replace tabs with spaces (or do any other search / replace regular expressions) for a list of files, you can simply use the built-in search / replace sed:
sed -i 's/\t/ /g' foo1.txt foo2.txt
or
ls *.txt | xargs sed -i 's/\t/ /g'
(In this example, I replace each tab character with three spaces.)
NOTE: the -i flag means in-place operation.
On the sed man page:
-i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if extension supplied)
arr_sea Mar 25 '14 at 1:31 2014-03-25 01:31
source share