There are several files I work with often. For instance some configuration files or log files. Let's say the Apache log file. I often want to
grep it. Instead of writing:
tail -50 /var/log/apache2/error_log
I prefer to write
tail -50 apachelog
apachelog functions as an alias for this filename. But if I define an alias in my
bashrc, it needs to be a whole command; it (apparently) can not be an alias for a filename so that you can reference it later. Is there a way to achieve this?
NOTE: I have a large variety of files and a large variety of different commands I want to run, so creating functions or aliasses for all of those different options will not be my preferred solution.