Shell Command Summary

Some of the orders to be used in 2016/7/3 are recorded here, to be continued ... 2016/7/4 More ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ View IP Address: windows:ipconfig/allLinux:ifconfig Ifdown disable the

Summary of the usage of brackets in the Shell

The brackets inside the Shell (including the single and double brackets) can be used to test some conditions: arithmetic comparisons, such as whether a variable is 0, [$var-eq 0]. File property tests, such as whether a file exists, [-e $var], is a

Linux shell some special symbols __linux

Some special symbols. $# the number of arguments passed to the script$* displays all parameters passed to the script in a single string. Unlike positional variables, this option argument can exceed 9$$ the current process ID number of the script

The expression __linux of Linux shell

Strictly speaking, there is no concept of an expression in the shell. The shell itself is simply a collection of commands, and certainly not a bunch of random piles, but a certain organization. But this organization is not so rigorous, so this

Double horizontal bar and single horizontal bar in Shell parameters

A shell process is a process that executes other processes, but when a command is executed, the shell process instructs the kernel to execute the specified program separately as another process and write the output to the terminal. With the command

Array operations in the shell

1. Array definition, the shell uses a pair of parentheses to represent the array, and the array elements are separated by "spaces" # empty array arr1 arr1= () # array arr2, members are 1, 2, 3, 4, 5, 6 arr2= (1 2 3 4 5 6) 2. Array elements read,

Shell command string handling __shell

bz2

In the shell programming process, you often encounter problems getting file names and file suffix names. The general processing methods are as follows: #code file= "Thisfile.txt" echo "filename:${file%.*}" echo "extension:${file##*.} "

Spark Shell simple to use _rdd

Basis Spark's shell serves as a powerful interactive data analysis tool, providing an easy way to learn the API. It can use Scala (a good way to run an existing Java library on a Java Virtual machine) or Python. Start running in the Spark directory

Quasi-synchronous shell script for intranet cluster

ssh

In the company's intranet configuration cluster synchronization, may be a proxy problem, NTPD and chrony are not used, so had to write shell script to solvePrerequisites for each machine in the cluster has been configured with a password-free

Shell Script Connection Create database

1. Connect to create a database #!/bin/bashmysql="mysql -uroot -p111111"#sql="show tables from mysql"sql="create table test.user( id int unsigned auto_increment primary key, username varchar(20), password varchar(30))"$mysql -e "

Shell Tutorial String

1.Shell stringStrings are the most common and useful data types in shell programming (except numbers and strings, and no other type works well), strings can be in single quotes or double quotes, or without quotes.1.1 Single quotation marksStr= ' I

Shell Programming-Statements (vii)

If Else judgment statement  If statementSyntax Format 1:if condition then statement 1 Statement 2 ... Statement NFISyntax Format 2:Often used in terminal command prompt if [conditional];then statement; fi  If Else statementSyntax format:if

Linux Shell script error:/bin/bash^m:bad interpreter:no such file or directory

Today, there is a very strange problem, the shell script that has been running very normal failed, but yesterday added a parameter.Error message:/bin/bash^m:bad interpreter:no such file or directoryLater found that root cause, modified the file

Shell Script Advanced

1. Process ControlShell script is a procedural programming language, the process of programming language is divided into three types of execution, namely sequential execution, select execution, loop execution, these three execution methods to build

Simulating a shell script to resolve Dos attacks

Method 1:#!/bin/shWhile TrueDoawk ' {print $} '. Access.log|grep–v "^$" |sort|uniq–c >/tmp/access.log#netstat –an|grep est|awk–f ' [:]+ ' {print $6} ' |sort|uniq–c >/tmp/access.log determine network ConnectionsEXEC While Read lineDoIp= ' echo $line |

Shell File/dir exist

Https://www.cnblogs.com/37yan/p/6962563.htmlCAUTION!!! If should is end with fiCAUTION!!! There should be a space between [and!, also between 1 and]1 ];then#!/bin/bash# Determine if the number of parameters passed in is not an if1 ];then echo

A shell command and script every day

Common Linux directory names/The root directory of the virtual directory./bin binary Directory/boot directory. Store startup files/dev Device Directory/etc System configuration Directory/home directory, where Linux creates the user directory/lib

SCP Large File Shell migration

In general, we are the most common command for copying data on the same server is CP, which can be used if you want to copy between different servers.Now there are two servers, you need to migrate the files on the a server to B server, because the

Shell operations and simple programming (III)

Shell Basics The first word entered in the command line must be the name of a command, and the second word is the option or parameter of the command. Each word in the command line must be separated by spaces or tabs. The format is as follows:$

Why do CD commands need built-in shell commands?

If you do not use the built-in command but fork to output a sub-process and execute it in the sub-process, the path of the parent environment will not be changed. After the execution is completed, it returns to the parent shell environment, and the

Total Pages: 541 1 .... 236 237 238 239 240 .... 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.