Note
This article compiles from the Commandlinefu.com series article top Ten one-liners from Commandlinefu explained. As a Web site recommended by the user as the most useful shell command, it records tens of thousands of shell commands, some of
http://fhqdddddd.blog.163.com/blog/static/186991542012417104144188/
EchoUse the echo command to display a line of text or a variable, or to enter a string into a file. Its general form is:echo stringThe echo command has many features, the most
Using the Linux shell is my daily basic work, but I often forget some useful shell commands and L tips. Of course, I can remember the order, but I'm not sure I can remember how to use it to perform a particular task. So I began to record these
The company does not have fixed IP, need to test the third party asynchronous callback interface (third party server How to find the company intranet machine); Baidu Search for "intranet penetration" results are mostly peanut shells, but this
Today, there is a problem that needs to be judged whether there is a. c file in the directory. I used the IF [-f *.c], using the-F and wildcard characters to determine if there is a. c file, while Linux always complains "unexpected operator", so
If you are not familiar with the Linux shell array, see an article: Linux Shell array Building and use techniques , this article is mainly about the dynamic generation of array series. There should be a lot of methods here, I mainly take a sum
1, Documents:
1.1, the file access to 3 kinds of ways:
1 read (show file contents), 2 write (edit, delete, modify permission), 3 execute (Run shell script, program, etc. executable files).
1.2, the file can be divided into 3 kinds of permissions:
Creating a table Create ' test1 ', ' lf ', ' SF ' Lf:column family of LONG values (binary value)--Sf:column family of STRING values imports According to put ' test1 ', ' user1|ts1 ', ' sf:c1 ', ' sku1 ' put ' test1 ', ' user1|ts2 ', ' sf:c1 ', '
1. Peanut Shell
The purpose of peanut shells is to apply for a free domain name.
The application method is very simple, is to download a peanut Shell client, register a peanut shell account, and then you will get a free domain name.
My account name
Reproduced from: http://changyang319.com/archives/2234
NO-IP is an established free Internet domain name provider, and if you've ever had a friend using an active IP stand, you should be impressed by how NO-IP can update the domain name IP through
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##*.}
"
CMD1 && cmd2 If the command cmd1 result status 0, the CMD2 is executed, otherwise the CMD2 command is not executed.
cmd1 | | CMD2 if the command cmd1 result status 1, the CMD2 is executed, otherwise the CMD2 command is not executed.
can be used for
A program that often needs help explaining.
The ways to activate help instructions are described in two ways
1. The simplest way is to discriminate by the number of parameters. For example, displays the help description without any parameters.
2.
Http://blog.zol.com.cn/2322/article_2321763.html
$ () and ' (anti-quote)
In the bash shell, $ () and "(anti-quote) are used for command substitution.
The so-called command substitution is similar to the variable substitution we learned in the fifth
See if the script syntax has errors:Bash-n modify_suffix.shTrack executionSh-x modify_suffix.sh AAA1.${var} 2.$ (cmd) 3. () and {} 4.${var:-string},${var:+string},${var:=string},${var:?string} 5.$ ((exp)) 6.$ (Var%pattern), $ (var%%pattern), $
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
Purpose: To determine whether a file (test.gz.txt) suffix is a zipCorrect command: if [[${filename} =~ ^test.*zip$]]Here are a few things to keep in mind:
use [[]] for its related usage see link 1;
=~ is connected, I am in use, did not pay
Function: Quickly and automatically generate keys and bulk push to remote host, suitable for batch push key for ansible environment#!/bin/bashkeypath=/root/.sshiplist=/root/ip.txt[[ -e ${iplist} ]] && > ${iplist}for i in `seq 81 91`do echo -E "192.
Words do not say much, directly on the format:function formats in the Linux shell:function Myfunc () {Action[Return int;]}Among them, the individual thinks function and () are all functions of the flag, if you do not need to pass parameters , choose
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
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