3 ms·
bash/shell knowledge helped me automate a lot of stuff with the 80/20 approach. I can't stress enough how often a simple 10 lines bash script automated hours of
by cookiengineer 7y ago
bash/shell knowledge helped me automate a lot of stuff with the 80/20 approach. I can't stress enough how often a simple 10 lines bash script automated hours of manual work for me.
Also, `vim -` (stdin buffer edit mode) is absurdly awesome. It starts with `ls -la | vim -` and ends up with `cat * | sed ... | vim -` and saves a ton of time.
These bashrc aliases rescued my stupidness a lot of times:
> alias cls="clear; printf '\033[3J'"; # clear screen and scroll buffer
> alias cp="cp -i"; # confirm before overwrite
> alias df="df -h"; # human-readable sizes
> alias mv="mv -i"; # confirm before overwrite
> alias ns="netstat -tup --wide"; # show active program sockets
If I would have to choose, it's definitely VIM that automated the most. Switched to VIM around 2004 and didn't regret it eversince.
Remotely debugging on an ssh server to figure out what's going on - with the same editor configuration and setup as on your desktop computer - comes in very handy in emergency situations when you have almost no tolerance for mistakes.