Category: Scripts

  • 3. Shell comparison operator & reference

    Command Description Example & Run the previous command in the background ls & && Logical AND if [ “$X” -ge “0” ] && [ “$X” -le “9”] || Logical OR if [ “$X” -lt “0” ] || [ “$X” -gt “9” ] ^ Start of line grep “^X” $ End of line grep “X$” =……

  • 2. Shell script loop & conditional statement

    Like other programming languages, shell script also have same loop concept, let us look at different types of loop syntax how it will work in shell scripts. For loop While Loops : always define as true, test below example. read is the command take user input, we will learn it later in details. Creating Directory……

  • Run Shell script in Windows 10

    Yes we can use Woindows 10 for execution of bash script. You need to change following things to make it enabled. After reboot open browser and hit https://aka.ms/wslstore will open store and install ubuntu. Now store a shell file given below to your desktop with .sh file extension. Example : test.sh Then go to terminal……

  • 1. Shell script comment variable and wildcard

    As we probably all know, shell script is badly required, when you thought to automate something in your operating system. We are here using Born shell(sh) and bash in linux ubuntu. Shell Comments We are making comments placing # symbol at the beginning of line which we need to comment out, or write comment should……