Using shell commands under Linux often uses shell output redirection like this:
1>/dev/null 2>&1
At the end of the shell command, we can redirect the output through the > symbol.
1. Standard input stdin file descriptor is 0, standard output
The shell provides an interface to UNIX systems. Collects input and executes the program according to input. When a program finishes executing, it displays the output of the program.
The shell is an environment where we can run our commands,
This article is from Baidu Encyclopedia.
What is a shell.
To be exact, the shell is a command-line interpreter whose function is to interpret the input commands and pass them on to the system, following a certain syntax. It provides users with
pssh Usage Scenarios
Assuming that you now need to configure updates for hundreds of server nodes or perform some short commands, and there is currently no complete deployment tool software, you can choose to log in to the remote terminal in
ContentEOFYou can replace EOF with something else (the decomposition character)It means to pass the content as standard input to the program.
Here is a brief look at the use of Character. The content after the delimiter is treated as input until the
Use the shell to determine if a folder or file exists
Determine if a folder existsif [! -d "/etc/open" ];thenecho "文件夹/etc/open不存在"esleecho "文件夹/etc/open存在"fi
Determine if the file exists and delete it if it existsif [ ! -f
1th Shell Basics 1.1 What is a shellThe shell is a command interpreter, which at the outermost of the operating system, is responsible for directly talking to the user, explaining the user's input to the operating system, and processing the output
Shell Project-Distribution system-build file distribution system
Requirement background for large companies, there must be a site or configuration file updates from time to time, and the use of the machine is certainly a lot of units, less
I. INTRODUCTIONIn shell programming, circular commands are used to control the execution of certain statements under certain conditions, and in programming languages, loop statements are one of the most basic syntaxes, and are no exception in the
Work in common to shell scripts, encountered a doubt, solve.A common explanation:Single-Quote String restrictions:
Any character in a single quotation mark is output as is, and the variable in the single-quote string is not valid;
A
The shell can often see: >/dev/null 2>&1 eg:sudo kill-9 ps-elf |grep-v grep|grep $1|awk ' {print $4} ' 1>/dev/null 2> The result of the/dev/null command can be defined in the form of%> output/dev/null represents the empty device file ">" for
Shell scripting to manage multiple servers at the same time, without the use of ansible, automatic manual implementationSSH does not log on to the Machine execution command (if you have to implement password-free login)ssh 127.0.0.1 ‘ifconfig‘ssh 127
ExitCommandExit The procedure used to control the program and the expression, there is an exit function in the General programming language, also exists in the Linuxshell.Exit 0Exit statusStatus A number between 0-255 indicates that the return
Directory index of this blog post[TOC]First, the Cognition function (a) What is a function?1, the function, the English called: function2. A function is a block of statements made up of several shell commands(b) Why should I use a function?1.
What is a shell?Shell is a use C Programming language, which is used by the user Linux the bridge. the Shell is both a command language and a programming language. Shell refers to an application that provides an interface through which users access
Array: A contiguous memory space that holds multiple elements.Declaring an array: bash-4 support In addition to the default 0,1,2 ... You can also customize the index format, which is called an associative arrayDeclaring an indexed array: declare-a
Project name: Online Shell Command Interpreter
Objective: To practice socket programming
Function: You can use Windows telnet to remotely log on to the Linux system, run your own shell command parser, and perform some simple internal and
We can use any text editor, such as gedit, kedit, emacs, VI, to write shell scripts. It must start with the following line (the first line of the file must be placed ):
#! /Bin/sh...
Note: It is best to use "! /Bin/bash "instead of"! /Bin/sh ",
Overview
Ipython is a python Interactive Shell, which is much better and more powerful than the default Python shell.
She supports syntax highlighting, Automatic completion,
Code Debugging, object introspection, support for bash shell commands,
In the database O & M process, shell scripts provide great convenience for O & M. The passing of shell script parameters as variables to SQL and SQL scripts is also a common situation for DBAs. This article mainly discusses how to pass parameters of
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.