In a for loop like this
for i in `cat *.input`; do echo "$i" done
if one of the input files contains entries of type *a , it will be and gives file names ending in 'a'.
Is there an easy way to prevent the extension of this name?
Due to the use of multiple files, globbing ( set -o noglob ) is not a good option. I would also have to filter the output of cat to escape special characters, but
for i in `cat *.input | sed 's/*/\\*'` ...
still causes the extension *a , and
for i in `cat *.input | sed 's/*/\\\\*'` ...
gives me \*a (including backslash). [I think this is another question though]
cagri source share