- 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.
- Microsoft Power BI Quick Start Guide
- 大數(shù)據(jù)項(xiàng)目管理:從規(guī)劃到實(shí)現(xiàn)
- 錯(cuò)覺:AI 如何通過數(shù)據(jù)挖掘誤導(dǎo)我們
- Maya 2012從入門到精通
- 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)實(shí)訓(xùn)
- STM32嵌入式微控制器快速上手
- Blender Compositing and Post Processing
- 3D Printing for Architects with MakerBot
- Deep Reinforcement Learning Hands-On
- Windows Server 2003系統(tǒng)安全管理
- RedHat Linux用戶基礎(chǔ)
- C++程序設(shè)計(jì)基礎(chǔ)(上)
- Wireshark Revealed:Essential Skills for IT Professionals
- Raspberry Pi 3 Projects for Java Programmers
- PowerPoint 2003中文演示文稿5日通