User Tools

Site Tools


burim:bash:udemy:introduction

IDE - Visual studio code

  • shell types supported in your system
root@zllart3:~# cat /etc/shells
/bin/ash
/bin/bash
/bin/rbash
  • tell the script it is a bash
 #! /bin/bash
 echo "Hello World" #this is a comment after the "#"
  • Variables
 two types system and user variables
 system variables are predefined and are in capital letters
  • example system variables
echo "Hello World" #this is a comment after the "#"
echo $BASH
echo $BASH_VERSION
echo $PWD
echo $HOME
echo Our shell name is $BASH
echo Our shell version name is $BASH_VERSION
echo Our home directory is $HOME
echo Our current working directory is $PWD
  • User defined variables, user defined variables may not start with numbers.
name=Mark
VALUE=10
echo The name is $name
echo value $VALUE
burim/bash/udemy/introduction.txt · Last modified: 2020/02/25 16:25 by burim

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki