To successfully create and run a shell script, we need to do three things:
Write a script. Shell scripts are ordinary text files. So we need a text editor to write them. The best text editors will provide syntax highlighting, allowing us to see a color-coded view of the elements of the script. Syntax highlighting will help us spot certain kinds of common errors.
kate, and many other editors are good candidates for writing scripts.
Make the script executable. The system is fussy about not letting any old text file be treated as a program, and for good reason! We need to set the script file’s permissions to allow execution.
Put the script somewhere the shell can find it. The shell automatically searches certain ...