3 ms·
Good advice. I used to be really into automating as much as possible of my work on the command line - even to the extent of writing one-line shell scripts or al
by vram22 10y ago
Good advice. I used to be really into automating as much as possible of my work on the command line - even to the extent of writing one-line shell scripts or aliases (Unix) or batch files (Windows) to reduce the amount of typing of a command name [1] (e.g. one or two letters instead of five or more). Recently been doing it less. Need to increase it again. Helps a lot.
[1] I know you probably don't mean only that sort of thing, there are bigger automations that can be done too, and have done those a lot too.
Edit: a useful thumb rule - picked up years ago, IIRC, from the book The Unix Programming Environment by Kernighan and Pike, is to observe your own use of a command a few times, and then if you find yourself using it enough in a certain pattern, automate that via a script, with suitable parameters, etc.
Could be something as simple as 'ltr' for 'ls -ltr' (with suitable changes to make it a script or a shell alias). In fact, many Unixes come with such an alias - 'll' for 'ls -l', because that command - 'ls -l' is typed so often in Unix.