- Learning Linux Shell Scripting
- Ganesh Naik
- 98字
- 2021-06-25 22:02:51
Brace expansion
Curly braces allow you to specify a set of characters from which the shell automatically forms all possible combinations. To make this work, the characters to be combined with the given string must be specified as a comma-separated list with no spaces:
$ touch file{1,2,3} $ ls
$ mkdir directory{1,2,3}{a,b,c} $ ls
$ touch file{a..z} $ ls
The following is the summary of various I/O-redirection and logical operators:
For example:
$ ls || echo "Command un-successful" $ ls a abcd || echo "Command un-successful"
These commands will print Command un-successful if the ls command is unsuccessful.
推薦閱讀
- Mastering Mesos
- Mastering Machine Learning Algorithms
- Implementing AWS:Design,Build,and Manage your Infrastructure
- R Data Analysis Projects
- Learning ServiceNow
- C++程序設(shè)計(jì)基礎(chǔ)(上)
- 數(shù)據(jù)要素:全球經(jīng)濟(jì)社會(huì)發(fā)展的新動(dòng)力
- Learn Microsoft Azure
- SolarWinds Server & Application Monitor:Deployment and Administration
- 人工智能基礎(chǔ)
- 歐姆龍CP1H型PLC編程與應(yīng)用
- VMware vSphere 6.5 Cookbook(Third Edition)
- 服務(wù)科學(xué)概論
- D3.js Quick Start Guide
- 巧學(xué)活用WPS