Latest Posts
Tags
awk awk examples awk gsub awk substr background run script bash awk curl disk space docker commands docker usage du find and grep Google Analytics grep examples java java example linux awk linux command linux find linux grep linux ls ls -al ls examples ls sort ls sort by size mkdir more is less mv examples mysql mysql example PlantedTank rm sed sed examples sed replace sed tutorial seo Shell tutorial top vim vim examples vim tutorial w wget wordpress
Tag Archives: Shell tutorial
Shell Command Test
The command test in the shell is used to check whether a condition is true. It can test numbers, strings and files. Number arguments test Tag Description -eq Integer1 and Integer2 variables are algebraically equal -ne Integer1 and Integer2 variables … Continue reading
Posted in Internet Technology
Tagged shell command test, Shell tutorial
Comments Off on Shell Command Test
Shell Flow Control
The flow control of shell cannot be empty which is different from other languages such as Java and PHP.The following is the writing of PHP flow control: We cannot do like this in sh / bash. If there is no … Continue reading
Posted in Internet Technology
Tagged shell flow control, Shell tutorial
Comments Off on Shell Flow Control
Shell Command Printf
In the previous chapter we learn the command echo, this chapter we will introduce the command printf. Printf mimics the printf () program in the C library. Printf is defined by the POSIX standard, so scripts that use printf are … Continue reading
Posted in Internet Technology
Tagged shell command printf, Shell tutorial
Comments Off on Shell Command Printf
Shell Command Echo
Echo in shell is similar to the echo in PHP which all output string.The syntax for echo is: You can use echo to achieve more complex output format control. 1. Display ordinary string: The double quotes here can be omitted,the … Continue reading
Shell Basic Operators
There are various operators supported by shell.We will now discuss the following operators: Arithmetic Operators Relational Operators Boolean Operators String Operators File Test Operators Bourne shell didn’t originally have any mechanism to perform simple arithmetic operations but it uses external … Continue reading
Posted in Internet Technology
Tagged shell basic operators, Shell tutorial
Comments Off on Shell Basic Operators
Shell Arrays
Shell arrays can hold multiple values,Bash shell only support one-dimensional values(can not support multi-dimensional) .We don’t need to define array size during initialization (similar to PHP).The subscripts of array elements start from 0 which is similar to most programming languages. We … Continue reading
Shell Passing Arguments
Arguments can be passed to the script when it is executed,we can get the arguments by the formats like $n.Inside the script, the $1 variable references the first argument in the command line, $2 the second argument and so forth. … Continue reading
Posted in Internet Technology
Tagged shell arguments, Shell tutorial
Comments Off on Shell Passing Arguments
Shell Variable
When you define the a variable name, the name should not prefix $(excepting in PHP ),for example your_name=”www.linuxcommands.site” We should not add blank space between the variable name and the equal sign which is different among your similar program languages.The … Continue reading
Shell tutorial
The Shell is a program written in C language, it is a bridge use Linux users.The Shell is a command language and a programming language.Shell is a kind of application, the application provides an interface to the user through the … Continue reading