Script

HowTo: Disable SSH Host Key Checking

How to disable SSH host key verification and bypass "The authenticity of host ***** can't be established." and "REMOTE HOST IDENTIFICATION HAS CHANGED." messages.

HowTo : Run and Repeat a Command N Times in Bash

In this short note you'll find how to run a command from the Linux command line and repeat it multiple times using loop in Bash.

Mass Emails Sending From Bash Script in Linux

Sending mass emails for testing purposes using Bash Script from the Linux Command Line.

Running Commands on a Remote Linux Server over SSH

In this note you will find the examples of how to execute commands on a remote Linux machine and get the result locally.

This information may be very useful if you are creating some Bash Script that should be ran from the local machine and execute some commands on a remote server.

You'll learn, how to :

  • execute a command on a remote Linux Server;
  • run multiply commands over SSH;
  • execute a local script on a remote Linux server without copying it.

CASE Statement in Bash [Example]

The following article describes the basic syntax and includes a simple example of the BASH CASE statement usage.

The CASE statement is the simplest form of the IF-THEN-ELSE statement in BASH.

Print Usage and Exit if Arguments are Not Provided

Use the following test in your shell scripts to :

  • verify a number of input values;
  • display an error message if the number of input argument is not correct;
  • exit a shell script with the error status.

HowTo : Check If a String Exists

Sometimes, we need to check if the pattern presents in a file and take some actions depending on the result.

It can be done with the help of 'exit status codes'. Each Linux command returns a status when it terminates normally or abnormally

You can use command exit status in the shell script to display an error message or perform some sort of action.

Pages