A previous developer on my project created backup copies of files using the format "filename (date time).extension" even though the project was under SVN control (don't ask!!!). I now can't open those files from bash as I receive the error message

-bash: syntax error near unexpected token `('

Is there an escape character or quotes that I can use to instruct bash to open the file?

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted

Same as always.

cat \(foo\)
cat '(foo)'
link|improve this answer
thanks. i think it was actually the spaces causing the issue. wrapping it in "foo (date time).ext" seems to work – Jonathan Day May 12 '11 at 11:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.