Shell Script Summary 2

Source: Internet
Author: User

Echo ' seq-s ' 10 '--command to use anti-quote
echo $ (seq-s "" 10)

(())
Let
Expr
BC--Features support for fractional counting
$[]

----------
[Email protected] ~]# ((ruan=1*8-9))
[Email protected] ~]# echo $ruan
-1
---------
[Email protected] ~]# b=$ ((1*2+3))
[Email protected] ~]# echo $b
5
---------
[Email protected] shell_ruanjp]# i=2
[[email protected] shell_ruanjp]# let i=i+8
[Email protected] shell_ruanjp]# echo $i
10
---------
[Email protected] ~]# echo "SCALE=2;5/3" |BC
1.66
---------
Read-p "Pls input a number:" Var
READ-T 3-p "pls input a number:"--3 seconds timeout exit

&/dev/null--its role


[< test expression;]
Test-f file && echo 1| | Echo 0
Test! -F file && echo 1| | Echo 0
--equal to the above
[-f file.txt] && echo 1| | Echo 0


File Test Operators


While True
Do
Code Layer
Done

Shell Script Summary 2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.