Shell determines disk space delete file

#!/bin/bash# @loyu################################################################################Sum= ' Df-h | awk ' {print $} ' | Sed-n 4p | awk-f% ' {print '} 'If [$sum-GT 75]ThenDate= ' Date +%y%m%d 'Echo-e "\NPDT"Echo

Shell syntax in makefile

Writing shell code in makefile is a bit weird, unlike shell syntax, and if you don't understand it, it can be confusing to see makefile. Here's a summary of some.1: The code that is the same line after the colon of the target item of the makefile

Linux05--shell Programming 01

1.Shell Script IntroductionBasic Introduction:A shell script is an executable plain text file that consists of multiple shell commands.Command execution is from top to bottom, from left to right analysis and executioncommand, multiple whitespace

The path is not shown in the Linux shell and is shown as two solutions for-bash-4.1#

This problem occurs because there is no configuration. Bash_profile problem, or we accidentally emptied or deleted the. bash_profile file.Method One: Modify the ~/.bash_profile fileThe steps are as follows:Vim ~/.bash_profile(No tube. Bash_profile

Shell simple Use (b) loop

Record a few simple examples of loop-related1. Wait for the expected content to be entered#!/bin/Bashuntil["$yn"=="Yes"-O"$yn"=="YES" ] DoRead-P"Please input yes/yes to stop this progras:"yn DoneEcho "ok! You input the correct answer."Wait to enter

Shell syntax-shell defining variables and calling variables

In the first line of the executable, we usually specify what interpreter to use to execute the file, such as the shell script, the beginning of the file is usually #! /bin/shRunning the shell will encounter three variables1. Local variables,

Shell to determine if a variable is empty

Determines whether a variable is empty.1. The variable is caused by "" quotation marksAs shown below:, you can get the result is NULL.#!/bin/shpara1=if [!-n "$para 1"]; Thenecho "is NULL"Elseecho "Not NULL"Fi2. Judging directly by variablesThe

Talk about the background process and foreground process of shell in Linux

Environment:Operating system: ArchLinux; Terminal Simulator: Rxvt-unicode (URXVT); Shell:bash;The background process referred to here is a ampersand (&) behind the command line, and the foreground process is the form of a command line that does not

How the shell intercepts strings

Summary of Shell interception string methods in LinuxHow does [Linux] calculate string lengths in shell scripts?There are eight ways to intercept a string, mainly for the following methodsThere are a number of ways to intercept strings in the shell,

Shell Special Symbols

* Wildcard characters? Compared with *, to match a# comment out, do not take effect\ de-signifier symboltouch \ #1. txtls \ #1. txt| A pipe character throws the result of a command to the next command$ variable prefix (when you get, use the variable,

How the shell generates a sequence 01 02 03 04 05

Seq Command IntroductionUse:Seq-print a sequence of numbersGrammar:seq [OPTION] ... Lastseq [OPTION] ... First Lastseq [OPTION] ... First INCREMENT LastCommon options-S,--separator=stringUse STRING to separate numbers (default: \

A legend is the shell test of Baidu interview

"Problem" script implementation, you can use Shell, Perl and so on. Save all the rows in file B, but none in file a, to file C and count the number of lines in C.To translate adult words is, suppose that there is a file a is:ABCDFile B is:1234ABNow

Shell Analysis Nginx Log Statistics

1. Count the IP addresses of the top 10 IP trafficCat Access.log | awk ' {print '} ' | Sort | uniq-c | Sort-nr | Head-n 102. View the current day IP traffic statisticsCat Access.log |grep "21/apr/2016" |awk ' {print $} ' |sort|uniq-c|sort-nr3. View

Some of the shell's points of attention (gradually replenished)

1) If you want to search the file name beginning with AB,#find/-name "ab*", pay attention to double quotation marks, or you will get an error.If you search a file, AB starts the sentence,#grep "^ab" file name , if using cat, is to show the full text.

Shell Foundation II

1.shell ScriptNew text, suffix sh, for example: abc.shAttention:The first line in the script needs to write #! /bin/bash#! Specify how to use the interpreter to execute the source code# indicates a commentAttention:PHP can also write shell

CentOS builds local Yum source shell script

How to use:1. Download the deltarpm-version.el6.x86_64.rpm python-deltarpm-version.el6.x86_64.rpm createrepo-version.noarch.rpm for the system version , put it in the sibling directory corresponding to the script.2. Take the rpm that needs to be

Basic knowledge of Shell programming

1. Use the editor to write a file, which is the command entered in the shell, can be used through the PATH environment variable reference to the command.#! /bin/sh #! The following parameter is the program used to execute the script#后面是注释The rest is

Shell Practice Verification Number

Original: https://leetcode.com/problems/valid-phone-numbers/Given A text file file.txt that contains list of phones numbers (one per line), write a one Liner bash script to print All valid phone numbers. Assume that a valid phone number must

Shell script execution Log Generic module

TargetImplementation records the start time and end time of the shell execution. Execution state, error message, and so on, the script calls the function in the way that the function encapsulates the log recordSource CodeGeneral function Script

Java calls the shell to get the return value

Transferred from: http://blog.csdn.net/tengdazhang770960436/article/details/120148391.shell file return.shEcho 1Echo 2Echo 32.java file Test.java[Java]View PlainCopy Import Java.io.BufferedInputStream; Import Java.io.BufferedReader; Import

Total Pages: 541 1 .... 467 468 469 470 471 .... 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.