The variables in bash are scalar. From Bash 2.0 it supports Array variables i.e., it can handle multiple values at the same time. All the naming rules of Shell variables [ … ]
Category: Shell Script
Arithmetic Substitution
In ksh and bash, the shell enable integer arithmetic to be to be performed.This avoids having to run an extra program such as expr or bc to do math in a shell script [ … ]
Command Substitution
The Bourne shell can redirect a command’s standard output back to the shell’s own command line i.e., the command’s output can be used as an argument to another command, or [ … ]
Defining Variable Name
There are certain limitations when the name of the variable is defined The name of the variable can contain letters(a to z and A to Z) It can have numbers [ … ]
Variables To Set and Access a Variable
A variable in shell script is it is the means of referencing a numeric or character value. And unlike formal programming languages, a shell script does not require to declare [ … ]
ECHO Command
The built-in echo command is an older form of printf command. Bash provides it for compatibility with almost all the shells. echo does not use a format string format like printf command It [ … ]
Executing a Shell Script
The easy way to run shell script in Linux or UNIX is to type the following commands. In the terminal type the following commands. $ sh myscript.sh OR $ bash [ … ]
Shell Script Comments
We should be aware of the fact that we might not be the only person reading our code. A lot of users and system administrators run script that were written [ … ]
Shebang
The #! Syntax used in scripts to indicate an interpreter for execution under UNIX/Linux operating systems. Most Linux shell and Perl/Python script starts with the following line. #!/bin/bashOR#!/usr/bin/perlOR#!/usr/bin/python It is [ … ]
File Type Attributes And File Permissions
Each and every content in Unix/Linux is a file and it supports a several different types of files. To determine the file type, specify the -/ optional to the /s command. [ … ]