Linux Shell Learning Notes __linux

Recently, writing shell scripts under Linux is almost as close to learning as writing. Record some learning experience here. a) The shell's quotation marks. the shell's quotes have single quotes ', double quotes ', and inverted quotes '. A

The meaning of the-Z to-D in the conditional judgment in the shell

The meaning of the-Z to-D in the conditional judgment in the shell Copyright Notice: This article original articles for bloggers, repost please indicate the source. If in doubt, please contact me. I'll be appreciated.

How to use the shell to limit the network bandwidth of a specified user shell program

In operation, you will encounter network bandwidth problems that need to limit the use of your shell applications (such as wget, Crul, FTP, SFTP, etc.) to connect to the Internet. How to set the network bandwidth without using complex firewall rules?

Jenkins executes the shell script, prompting "command not found"

Background Title, using the ng build command on Jenkins to build a angular2 project, the console outputs the following information: /tmp/hudson3008133988036917430.sh: Line 3:ng: Command not found Let's examine the possible causes of

Shell--cat,find,xargs,tr,sort,grep

A Cat 1.cat file1 file2 file3 ... 2. Use a pipe to read from the standard input: echo "Hadoop hive!" | Cat–file.txt 3. Compress Blank Lines (1) Compress multiple continuous whitespace behaviors single Cat-s file (2) Remove blank lines Cat File.txt |

Shell Script Learning Day fourth--bash internal variables, variable main strings, variable substitution

One, bash internal variables: Common internal commands: Echo,eval,exec,export,readonly,read,shift, wait,exit, and Dot (.) are also the source commands. Command function Echo Variable Name Displays the variables

Shell script common commands (handbook_1)

the general format of the shell and other interpreted languages?#!/bin/bash #shell脚本的首行格式 #!/usr/bin/python #python脚本的格式 #!/usr/bin/perl #perl脚本的格式 #Description: # "#" at the beginning of a single well font is an annotation, after which content is

A workaround for shell scripts to pass arguments with spaces

Tag: ROM color resolves RDM and value where SEL referenceAs shown in the following example:#!/bin/SHDT=20180829rdms_presql='select * from Dm_general_stat where DimCode = "Day" and Dimvalue ='-djava.ext.dirs=To pass a SQL as a parameter to the Java

Shell script Kill (Kill) port number corresponding to the PID process

I use the Mac is when you start a Python port process, even if it is turned off, the background process is still present, the process of initiating the same port, or the error prompt has been occupiedWhen you lsof-i: the port number (linux--(SS-ANPT

The difference between $ (()), $ (), ${} in the shell

$ () 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 chapter, which is used to reorganize the command

Hdu.5730.shell Necklace (FFT of division and Treatment)

Topic links\ (description\)There are \ ( n\) lengths ( 1,2,\ldots,n\) of beads, each with a \ (a_i\) species, each number of unlimited. How many methods are used to compose a string of length \ (n\) . Answer to \ (313\) modulo.\ (solution\)Make\

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

ffi

I. Logical judgments in shell scriptsGrammar1. Format 1if condition; Then statement; FiExample: If a is greater than 3, print OK[[email protected] ~]# vi 2.sh[[email protected] ~]# bash -v 2.sh #!/bin/basha=5if [ $a -gt 3 ]then 2. Format 2if

Shell script Execution Error [: 0:unary operator expected

When executing shell script, if judgment statement error#!/bin/bashif [0 = = $testNum]then echo "Check result:0" fi  Testnum is not defined when used, no assignment is empty (originally defined, just a clerical error is similar to tsetnum), after

Shell Basic Operations Summary

1.echoAndif else fiCommand#!/bin/bashecho hello;echo therefilename=demo.shif [ -e "$filename" ]; then echo "$filename already exists!";cp $filename $filename.bakelse echo "$filename does not exist!";fi;echo "File test complete!"Run result

The arithmetic operation of Linux shell programming

+ Plus-Minus* Multiply/except* * Sub-party% take-upThese operational symbols need to be escaped in some scenarios. For example, in a wildcard scenarioThe operation must be two brackets or a bracketLet operation does not display the result and

8.10-8.13 Shell Special Symbol

8.10 Shell Special symbol Cut commandSpecial symbols (top):A 1.* represents 0 or more arbitrary characters.2. Represents only one arbitrary character ( whether it is a number or a letter, as long as it can be matched. )3.# This symbol in Linux

Automatic matching and binding auto scaling policy "shell" based on memory size

#!/bin/Bash forXinch$ (cf a|grepstarted|TR-S" "|Cut-D" "-F1) Doins_quantity=$ (cf a|grep$x |TR-S" "|Cut-D" "-F3|Cut-D"/"-F2); App_memory=$ (cf a|grep$x |TR-S" "|Cut-D" "-F4); Echo "AppName:"$xEcho "Instance num:"${ins_quantity};

Detecting memory leaks in your application (shell)

Write code--debug--fix bugChange to change there may still be some problems that are not found, when the project volume is more prone to occur, such as memory leaks such problems, serious impact on system performance.There are some tools on the

Some ways the shell extracts file names and directory names

First, use ${}1, ${var##*/}The purpose of this command is to remove the variable var from the left side of the last '/' character and its left side of the content, return from the left side of the last '/' (excluding the character) to the right of

Introduction to the basic features of the CentOS System Shell Programming Language Foundation Bash

The command history of Bash's underlying features:Command history: The shell process saves commands that were previously executed by the user in its session~] #historyCustomizing the history function, which can be implemented by environment

Total Pages: 541 1 .... 100 101 102 103 104 .... 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.