One of the key goals of serious script writing is ease of maintenance; that is, the ease with which a script may be modified by its author or others to be adapted to changing needs. Making a script easy to read and understand is one way to facilitate easy maintenance.
Many of the commands we have studied feature both short and long option names. For instance, the ls
command has many options that can be expressed in either short or long form. For example:
[me@linuxbox ˜]$ ls -ad
and
[me@linuxbox ˜]$ ls --all --directory
are equivalent commands. In the interests of reduced typing, short options are preferred when entering options on the command line, but when writing scripts, long options can improve readability. ...
No credit card required