Yes of course putting a string in a variable does not make it a file. Testing it with -T does check that it is a file, and it looks like text. As hdb points out the OPs open was probably failing so my addition of a test to open would have made that clear too.
Cheers,
R.
In reply to Re^3: File Test operators, option -T
by Random_Walk
in thread File Test operators, option -T
by virtuemart2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |