- Bash Quick Start Guide
- Tom Ryder
- 218字
- 2021-07-23 16:58:56
Simple commands
At an interactive Bash prompt, you can enter a command line for Bash to execute. Most often while in interactive mode, you would issue only one simple command at a time, ending each command with Enter. You would then wait for each command to finish before entering the next one, examining any output or errors that it passes to your terminal after each command.
A simple command consists of at least a command name, possibly with one or more arguments, each separated by at least one space. The full definition can also include environment variable assignments and redirection operators, which we'll explore in later chapters.
Let's consider the following command:
$ mkdir -p New/bash
This simple command consists of three shell words:
- mkdir: The command name, referring to the mkdir program that creates a directory
- -p: An option string for mkdir that specifies that the full directory path can be created, whether or not any of the directories in the path already exist
- New/bash: The relative path for the directory to create
Note that -p is not a special word or syntax to Bash; it's special to mkdir. Bash simply passes it to mkdir as an argument. The meaning of command options is a property of the commands themselves, not the shell from which they're called.
- 軟件架構(gòu)設(shè)計
- 反饋系統(tǒng):多學(xué)科視角(原書第2版)
- Hands-On Data Science with SQL Server 2017
- 腦動力:PHP函數(shù)速查效率手冊
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- JMAG電機(jī)電磁仿真分析與實例解析
- 嵌入式Linux上的C語言編程實踐
- 大數(shù)據(jù)技術(shù)入門(第2版)
- 可編程控制器技術(shù)應(yīng)用(西門子S7系列)
- 系統(tǒng)安裝與重裝
- 大數(shù)據(jù)驅(qū)動的機(jī)械裝備智能運維理論及應(yīng)用
- Deep Reinforcement Learning Hands-On
- 精通數(shù)據(jù)科學(xué):從線性回歸到深度學(xué)習(xí)
- IBM? SmartCloud? Essentials
- 三菱FX/Q系列PLC工程實例詳解