Each morning I run the following command that tails a log file created daily:
ssh -t [email protected] tail -f development/abc/$(date -u +%Y%m%d).log
This works just fine and each morning the log file of that day gets tailed with no issues. This past Friday I created the following alias for this command in .zshrc and on Friday it worked flawlessly:
alias abc_log='ssh -t [email protected] tail -f development/abc/$(date -u +%Y%m%d).log'
This morning I ran abc_log and was returned this error:
tail: cannot open `development/abc/20160509.log' for reading: No such file or directory
Connection to 55.555.55.55 closed.
Once I ran source ~/.zshrc
then abc_log
worked as normal. I prefer not to have to reload .zshrc each morning. Suggestions? Thanks!