Sunday, November 1, 2015

linux - grep: Invalid back reference for date expression in tcsh

I googled for the following error, and didn't get any great explanations as to what was going on with grep under tcsh. (Yes, that date expression exists in the log files).



$ grep '2014-07-21' *.log
grep: Invalid back reference


Curiously, if I switch to bash, the command works fine (that is my current work-around). Anyone know what's going on here?




Because someone will ask, here are the results of which and alias:



$ which grep
/bin/grep

$ alias grep
$ # (Nothing)



This is running on RHEL 5.4 (Red Hat).

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...