Skip to content

lynxestudio/UsefulShellScripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Some useful shell scripts

What is a Shell?

A shell is an environment in which we can run commands, programs and others shell scripts. The UNIX operating system popularized many of the ideas about shell scripting. In UNIX, which is the parent operating system of Linux, you build a small and simple utility and we use it as one link in a string of others to form a command. The shell acts as the interface between you and the Linux System, allowing you to enter commands for the operating system to execute.

Fig 1. Linux architecture

The basic concept of a shell script is a list of commands, which are listed in the order of execution. Shell scripts are interpreted. They are ASCII text that is read and execute by the shell interpreter. When we execute a shell script, the shell intepreter goes through the ASCII text line by line, and executes each statement, as each line is reached from the top to the bottom.

You can get the following scripts in the src folder:

  1. countFolders.sh: Counts the total number of folder in a given path.
  2. countFiles.sh: Counts the total of files in a given path (same logic that countFolder).
  3. convertLower2Upper.sh: convert the files names of a given path to Uppercase.
  4. covertUpper2lower.sh: convert the files names of a given path to Lowercase.
  5. burnfolder2iso.sh: makes the iso image of a given folder.
  6. PgAgent.sh: starts or stops a PostgreSQL database.
  7. killmyprocess.sh: kills a process running by the user.
  8. showFrequencyWords.sh: Displays the word frequency in a text file.
  9. showFileSize.sh: Displays the size of the files of a given path.

Releases

No releases published

Packages

No packages published

Languages