I'm trying to do something like this in bash:
grep ( date | awk '{print "2006-" $6}' ) /some/file/here
But that syntax is incorrect.
The goal is to grep /some/file/here for the pattern 2006-2011 where 2011 is the current year.
|
|
Easier:
Here, you use date's ability to format the output arbitrarily. Note that none of these match any year in the range 2006-2011, they match the literal string "2006-2011". If you want to match any one year, let us know. |
||||
|
|