Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Bash Shell Online

mkdir my_dir
echo "Inserer">>premier.txt 
cat premier.txt
ls 
pwd

cp premier.txt second.txt
echo "retirer">>second.txt
cat second.txt

ls -lsha

cat premier.txt second.txt >>third.txt
cat third.txt

grep retirer second.txt

cp my_dir my_dir2


rm my_dir


Execute Bash Shell Online

#!/bin/bash
FILE="$1"
if [ $# -eq 0 ];
then
echo "Pass appropriate number of command line arguments"
fi
if [ ! -f "$FILE" ] && [ ! -d "$FILE" ] && [ ! $# -eq 0 ];
then
echo "Input file does not exist"
fi
if [ -d "$FILE" ];
then
echo "Input file is not an ordinary file"
fi
if [ ! -r "$FILE" ];
then
echo "Input file does not have read permission"
fi
if [ -f "$FILE" ] && [ -r "$FILE" ];
then
grep -cvP '\S' "$FILE"
fi

So Suwada blad

# Hello World Program in Bash Shell
z=1
k=$z

shift
shift
until [$z -gt $k]
do
  z=$[$z+$1]
  shift
done
echo $z

test

# Hello World Program in Bash Shell

"""
    echo "this does not print"
"""

Execute Bash Shell Online

#!/bin/bash
# Automated Date Recorder
#MVL Lab Shell Script 01

yyyy=2019	
mm=1
dd=1
hh=00

while [ $yyyy -lt 2020 ];
	do	
    	while [ $mm -lt 13 ];
        	do
            	while [ $dd -lt 31 ] ; 
                do
                
                    	while [ $hh -lt 24 ];
                        	do
                            	echo "Current Status: $yyyy/ $mm/ $dd : $hh"
                                hh=$(($hh + 06))
                            done
                       hh=00
                       dd=$(($dd + 1))
                done
                	dd=01
                	mm=$(($mm+1))
            done
         		mm=01   
         		yyyy=$(($yyyy+1))
     done

Execute Bash Shell Online

#!/bin/sh
echo "GENERAL SYSTEM INFORMATION"
/usr/bin/screenfetch
echo
echo "SYSTEM DISK USAGE"
export TERM=sterm; inxi -D
echo
echo "CURRENT WEATHER AT LOCATION"
ansi weather -l indianapolis

shell

# Hello World Program in Bash Shell
foo=2
echo "Hello World!"
echo $foo
if [ "$foo" -ge 3 ]; then
    echo "Greater than"
else
    echo "Less than"
fi

first='Madhu'
lastname='Naidu'
middle='Naidu'
surname='Yanamala'
if [  $first=='Madhu' -a $lastname=='Naidu' ]; then
    echo "First" $first
    echo "Last" $lastname
else
    echo $middle
fi

if [ $first=='Naidu' -o $lastname=='Yanamala' ]; then
    echo "Second" $first
    echo $lastname
else
    echo "Else" $lastname
fi
if [ 'mad'='mad' ]; then
    echo 'mad'
else
    echo 'else mad'
fi
name=
if [ -z  "$name" ]; then
    echo "True empty"
fi
if [ "$first"='Madhu' ] && [ "$surname"=~"n" ]; then
    echo "Surname" $surname
    echo "First" $first
fi

if [[ "$middle" == "Naidu" && "$first"="Madhu" ]]; then
    echo "And" $middle
else
    echo "And false"
fi
if [ "$first"=="Madhu" ]; then
    echo "True" $first
    if [ "$surname"=="Yanamala" ]; then
        echo "True" $surname
    fi
fi
if [ "$first"="Madhu" ] && [ "$surname"="Yanamala" ]; then
    echo "TRUE" $first $surname
fi

script

mkdir myfolderxx
cd myfolderxx
touch myfile{1..100}.txt
pwd myfile
ls -m

deutsch

#!/bin/bash
# Script to add a user to Linux system
if [ $(id -u) -eq 0 ]; then
	read -p "Einen Benutzer eingeben : " username
	read -s -p "Ein Passwort eingeben : " password
	egrep "^$username" /etc/passwd >/dev/null
	if [ $? -eq 0 ]; then
		echo "Benutzer Existiert schon!"
		read -p"Benutzer entfernen (j/n)? " response
			if ( "$response" == "j" ); then
			    echo "Entferne User : " $username
			    userdel $username
			    bash ./adduser.sh
			    exit 1
			else
			    echo "Bitte anderen Benutzer eingeben : "
			    read -p "Einen Benutzer eingeben : " username
	                    read -s -p "Ein Passwort eingeben : " password
	                    egrep "^$username" /etc/passwd >/dev/null
		              if [ $? -eq 0 ]; then
		                   exit 1
		               	 else
				   pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
				   useradd -m -p $pass $username
				 [ $? -eq 0 ] && echo "User wurde hinzugefuegt!" || echo "User konnte nicht erstellt werden!!"
		              fi
			fi
	else
		pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
		useradd -m -p $pass $username
		[ $? -eq 0 ] && echo "User wurde hinzugefügt!" || echo "User konnte nicht erstellt werden!!"
	fi
else
	echo "Nur root darf einen Benutzer zum System hinzufügen"
	exit 2
fi

read -p"Noch einen Benutzer erstellen (j/n)? " response
if ( "$response" == "j" ); then
	bash ./adduser.sh
	exit 3
else
    echo "thx .. "
    exit 4
fi
echo "ENDE"

Execute Bash Shell Online

Unable to open file!