3. Shell comparison operator & reference

CommandDescriptionExample&Run the previous command in the backgroundls &&&Logical ANDif [ "$X" -ge "0" ] && [ "$X" -le "9"]||Logical ORif [ "$X" -lt "0" ] || [ "$X" -gt "9" ]^Start of linegrep "^X"$End of linegrep "X$"=String equality (cf. -eq)if [ "$X" = "bar" ]!Logical NOTif [ "$X" != "bar" ]$$PID (Process ID)of current shellecho … Continue reading 3. Shell comparison operator & reference

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. cat /etc/shells #it will give us following shells /bin/sh # Bourne Shell /bin/bash # Bourne again shell unix and windows /bin/rbash # Restricted Shell … Continue reading 1. Shell script comment variable and wildcard