Technical Details Display 7″ multi-touch display with IPS (in-plane switching) technology and anti-reflective treatment, 1024 x 600 pixel resolution at 169 ppi, 16 million colors. Size (in inches) 7.5″ x 4.7″ x 0.45″ (190 mm x 120 mm x 11.4 mm). Weight 14.6 ounces (413 grams). System Requirements None, because it’s wireless […]
Month: September 2011
if…else…fi
If given condition is true then command1 is executed otherwise command2 is executed. Syntax: if condition then condition is zero (true – 0) execute all commands up to else statement else if condition is not true then execute all commands up to fi fi example of nested if else osch=0 echo “1. Unix (Sun Os)” […]
if condition
if condition which is used for decision making in shell script, If given condition is true then command1 is executed. Syntax: if condition then command1 if condition is true or if exit status of condition is 0 (zero) … … fi
Pipes
A pipe is a way to connect the output of one program to the input of another program without any temporary file. Syntax: command1 | command2 eg: who | wc -l Output of who command is given as input to wc command So that it will number of user who logon to system
Command line arguements
eg: $ myshell foo bar Shell Script name i.e. myshell First command line argument passed to myshell i.e. foo Second command line argument passed to myshell i.e. bar In shell if we wish to refer this command line argument we refer above as follows myshell it is $0 foo it is $1 bar it is […]
Wildcards
Wildcard types: 1. * – Matches any string or group of characters. 2. ? – Matches any single character. 3. […] – Matches any one of the enclosed characters Note: [..-..] A pair of characters separated by a minus sign denotes a range.
The read statement
Use to get input (data from user) from keyboard and store (data) to variable. Syntax: read variable1, variable2,…variableN eg: #!/bin/sh echo “Enter your name please” read fname echo “Welcome $fname”
Exit status
By default in Linux if particular command/shell script is executed, it return two type of values which is used to see whether command or shell script executed is successful or not. (1) If return value is zero (0), command is successful. (2) If return value is nonzero, command is not successful or some sort of error executing command/shell […]
Quotes in scripts
Mainly three types of quotes are used. 1. ” – Double quotes: Anything enclose in double quotes removed meaning of that characters (except and $). 2. ‘ – Single quotes: Enclosed in single quotes remains unchanged. 3. ` – Back quotes: To execute command
Shell Arithmetic
used to perform arithmetic operations in shell scripts. Synatax: $ expr op1 operator op2 eg: $ expr 1 + 3 $ expr 2 – 1 $ expr 10 / 2 $ expr 20 % 3 $ expr 10 * 3 $ echo `expr 6 + 3` in the last one we used back quote (` […]