|
any way to squish several date options into one line?
this obviously isnt overly important, but its a bit slow and i was wondering if i could prevent it from re-searching the file several times. i want my matches from the previous and coming three days, as well as today. this is what i have but its weighty and im having trouble finding a way to slim it down.
cd ~/work
grep -iT `date --date="3 days ago" "+%b%d"` les
grep -iT `date --date="2 days ago" "+%b%d"` les
grep -iT `date --date="1 days ago" "+%b%d"` les
grep -iT `date "+%b%d"` les
grep -iT `date --date="next day" "+%b%d"` les
grep -iT `date --date="2 days" "+%b%d"` les
grep -iT `date --date="3 days" "+%b%d"` les
just need to spit out the lines starting with mmmdd, and im hoping to save some space/time.
thanks
nomkev
|