Here we make some introduction to the most fundermental operation in bash script, which will greatly enhance you experience and efficience in linux/unix-like maachines.
Configuration
Enable syntax highlight in bash
To be able to tell a difference of files and folders, you can set the bash environment to highlight them [1]. You just need to edit you .bash_profile and add the following commond.
1 | vi ~/.bash_profile |
After that you can enable the setting by: ‘source ~/.bash_profile’
Move curse faster
To move your cursor faster, you do follow these options:
- “Ctrl” + “a”: move cursor ahead the line
- “Ctrl” + “e”: move cursor to the end of a line
Undo and Redo
- “Ctrl” + “+”: Redo
- “Ctrl” + “-”: Undo
Reference
[1] https://tiriboy.blogspot.com/2015/01/syntax-highlighting-bash-terminal-and.html