I was working on a project, where I need to open file from different servers and different paths. I do it with the command:
This is okay when the path is short but when the path gets longer and I have different config files to open from the same path or their associated logs, then it becomes un-necessary typing. So, I did the following:
Have a file with some aliase\’s like the below and source it from the bashrc file:
conf_app1=dns #this is with path
log_app1=dns #this too is with path
And then I have a bash script that will use these variables to open the file required. I use the format as
view.sh c/l app1
where c/l denotes whether I want to open the config file or the log file. Download the script here.