I've already automated some tasks. However, I find it difficult to write useful bash commands that I will reuse later. Maybe I should learn a scripting programming language.
I've already automated some tasks. However, I find it difficult to write useful bash commands that I will reuse later. Maybe I should learn a scripting programming language.
Try to avoid "pre-judging" the usefulness of scripts. As another commented mentioned, something as simple as:
ls -l
may be useful to you. It also helps establish the habit of editing (saving) the script before you execute it.So just write some scripts and see if you use them again. You will probably end up with too many, but that's ok, because you can remove the unnecessary ones later, and you'll have gotten extra practice creating the scripts in the first place.
> Maybe I should learn a scripting programming language.
That's really your preference based on your need for portability (i.e. minimizing the dependencies required to run the script.) Using Python or Perl is perfectly fine for these scripts, but they do require that the system has one of those languages installed. If you're doing a lot of work on machines that you do not administer, it's more likely that Bash is already there.