Skip to main content
added 276 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
grep "$(date +"%b %d")" *files* 

should be better.

SeeIf you leave out the double quotes, then the result of the command substitution man $(date +"%b %d") is split into separate words. Always use double quotes around variable substitutions "$variable" and command substitutions "$(somecommand)" unless you know why you need to leave them out.

grep "$(date +"%b %d")" *files* 

should be better.

See man date

grep "$(date +"%b %d")" *files* 

should be better.

If you leave out the double quotes, then the result of the command substitution $(date +"%b %d") is split into separate words. Always use double quotes around variable substitutions "$variable" and command substitutions "$(somecommand)" unless you know why you need to leave them out.

Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97

grep "$(date +"%b %d")" *files* 

should be better.

See man date