Shell commands read data and output data

Several ways the shell script reads data:1. keyboard input, default2. read from the file3. Pass through Pipeline command Functions of Echo:C: No Line changeF: Paper FeedT: Jump latticeN: Line WrapRepresents an escape, for example: "/dev/rmt0"

Shell script code to determine if a file exists _linux shell

Implement code One, #!/bin/sh # to determine if a file exists # link:www.jb51.net # date:2013/2/28 mypath= '/var/log/httpd/ ' myfile= ' Var/log/httpd/access.log " # Here's the-x parameter to determine if $mypath exists and has executable

A key to start the cluster shell script

A key to start the cluster shell script, including HDFs HA + yarn related to all the programs, fbi00x is the host name for your reference: #!/bin/bash echo "-------------------------Step1----------------------------" echo "now,starting zookeeper.

Using shell scripts to automatically build OpenSSL CAs, etc.

In fact, it has been written before, but only to achieve the automatic creation of CA certificates and other documents, the recent time is quite well-off, plus the use of this dongdong almost ubiquitous, and therefore, on its basis to do some

Linux System shell command and Help document command (man)

1. Powerful and useful shell commandGenerally speaking, computer hardware is composed of operators, controllers, memory, input/output devices and so on, and let a variety of hardware devices and can work together to operate the system core. The

Review shell scripts

What is a shell script. First, it is a script and cannot be used as a formal programming language. Because it's running in the shell of Linux, it's called a shell script. To be blunt, a shell script is a collection of commands. For example, I want

Shell script app (for, while Loop statement and Case Branch statement)

1, for: Read different variable values, execute the same set of commands one by one, until the value is complete exit, variable values are separated by a spaceGrammar:For variable value in value listDoCommand sequenceDone2, while: Repeated testing a

Three ways to invoke another shell script in a shell script

The main following are several ways: Command explanation Fork A new child shell executes, and the child shell can inherit environment variables

67. Shell script Introduction, shell script structure and execution, date command usage, variables in shell script

67. Shell Script Introduction, shell script structure and execution, date command usage, variables in shell scriptFirst, Shell script introductionThe shell is a scripting language aming_linux blog.lishiming.netYou can use logical judgments, loops,

Logical judgments in Linux shell scripts, file directory attribute judgments, if special usages, case judgments

Logical judgments in shell scripts Format 1:if condition; Then statement; Fi (Common) #以命令的方式表达[[email protected] ~]# for i in `seq 1 5`; do echo $i; done12345[[email protected] ~]# for i in `seq 1 5`> do> echo $i>

Shell's >/dev/null, 2>&1, 2>1

Reprinted from: http://dos2unix.cn/link/4801. Standard input stdin file descriptor is 0, standard output stdout file descriptor is 1, standard error stderr file descriptor is 22./dev/null empty equipment, equivalent to garbage bin3. REDIRECT Symbol:>

Shell Scripting Interaction: Expect learning notes and examples

Recent project requirements, need to write some shell script interaction, the pipeline is not enough time, expect can be very good to implement the interaction between the script, search for information, found that many articles on the Web are

Shell Script Writing Basics

Scripting is essential for Linux testing, and the name of the shell script can be arbitrarily defined, and no suffix, such as the name can be written abc,smartzip, as long as the runtime typeThe./smartzip will be able to run the script.Do not use

The meaning and difference of the shell 1>&2 2>&1 &>filename Redirection

In the shell program, the most commonly used FD (file descriptor) is about three, respectively:0 is a file descriptor that represents the standard input (stdin)1 is a file descriptor that represents the standard output (stdout)2 is a file descriptor

Basic analysis of Linux operating system (vii)--bash (Shell) Basics (4)

Ix. unfoldingThe expansion of the command line is done after splitting the word into words. There are seven types of expansion: curly brace expansion, wavy line expansion, parametric and variable expansion, command substitution, arithmetic expansion,

Description of if else and greater than, less than, equal to logical expressions in the shell

For example, comparing strings, judging whether the file exists and whether it is readable, etc., usually uses "[]" to represent the condition test.Note: The space here is important. The space to ensure the square brackets. I have wasted a lot of

[Batch processing Tutorial shell]002.linux Common command Daquan

This time the collection is a relatively basic Linux command, in fact, the Linux command does not have to remember each, as long as the use of the command can be consulted to see the use of. System Information The processor

Shell Script Learning 22 Shell function: Shell function return value, delete function, call function at terminal

function allows us to divide a complex function into several modules, which makes the program structure clearer and the code reuse more efficient. Like other programming languages, the Shell supports functions as well. The Shell function must be

Linux History Security Issue "save records Prevent deletion" + Perfect Linux/unix audit log each shell command

2011-09-27 22:11:51| Category: rhel5_033| Report | Font size Subscription Linux uses Prompt_command to realize audit functionThis system audits, records what the user, at what time, did what operation. The information is then recorded in a

Linux Shell script programming-Linux special symbols

Linux special symbols Common special symbols in shell are listed as follows: #;.,/\ 'String' |! $ {}$? $ * "String "***? : ^ $ # $ @ 'COMMAND '{} [] [[] () | & {XX, YY, ZZ ,...}~ ~ + ~ -& \ +-% =! =   # Comments)This is almost a full-market symbol,

Total Pages: 541 1 .... 13 14 15 16 17 .... 541 Go to: GO

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.