Linux Common Shell command w

WC: View File Statistics usage: $ WC filename1. $ WC fileName$ WC FileNameX Y Z/desktop/helloX: Indicates the number of rowsY: Indicates the number of wordsZ: Indicates the number of bytes/desktop/hello: Indicates file name2. $ wc-l FileName-l

RHEL7 Create multiple user groups and users, set up candidate groups, default shell

Create multiple user groups and users, set up candidate groups, default shellgroupadd-g 40000 adminuser specify GIDUseradd natasha-g adminuser Specify a subordinate group[Email protected]/]# Useradd Harry-gadminuser[Email protected]/]# Useradd sarah-

Syntax structure for Bash shell scripts

Purpose: Self-collation, self-review, self-reflection!Content: Dry Goods! Dry!! Dry!!!Attach: The shortcomings of the hope that you correct, can give like me rookie a little inspiration is the best. Just the inspiration ...Thank you: Thank the old

Common shell command logging under Linux

Hardware Chapter CPU-related Lscpu #查看的是cpu的统计信息. Cat/proc/cpuinfo #查看CPU信息详细信息, such as the model of each CPU, frequency, etc. Memory-related Free-m #概要查看内存情况 The unit here is

Bash Shell Base three string test and for loop

String test:= =: Determine string equality! =: Judge strings are not equal-N: Tests whether the specified string is empty-S: Tests whether the specified string is not emptyLoop statement:for variable in list; DoLoop bodyDoneExample:For I in 1 2 3 4 5

You may not know the shell

The shell is also called the command line interface, which is the interface between the user and the computer under the *nix operating system. The word shell refers to the program in the operating system that provides access to the kernel

Shell Date Time addition minus

1. Using the DATE-D optionDate + "%y%m%d"-D "+n days" today's post N day datesDate + "%y%m%d"-D "-N days" today's top N Day dates2. Common date formatPython [[email protected] tmp] # date + "%F" -- [[email protected] tmp] # date + "%d" ///

Shell Small Script

Use the awk command to combine two lines of the same name in the following two files.A file:Han Hailin 21 years oldHailin Korea 23 years oldHan Linhai 22 years oldLin Hai Han 24 years oldB File:Han Linhai MaleHailin Han NanHan Hailin MaleLinhai Han

Linux shell Scripts-Basic Learning Notes

Linux scripting is not too strong, and recently tutorial, after all, Linux shell in the daily work is still very common,It is more convenient to use, save time and effort.Here are the study notes, partial theory, followed by a few examples for

Linux Shell learning comes in mind

The Magical magic of awk:Extract the number 600 and note the special effect of the + sign.echo "Fuck 600ms" |awk ' {print + $NF} 'Result: Other characters are filtered, leaving only the number 600Using If,for in Commad mode#测试ifa=200if [$a = =];then

Shell Parenthesis Usage Introduction

Medium brackets [ and the test command equivalent, the user Boolean judgment, such as:1 a='abc'2if'abc' ] 3 Then 4 " Yes " 5 Else 6 " No " 7 FiEquivalent to1 if ' ABC ' 2 Then 3 " Yes " 4 Else 5 " No " 6 FiWhen using [], be

Linux Programming (ii) Shell programming

1. Piping and redirectionFile descriptor 0: standard input for a programFile descriptor 1: Standard outputFile descriptor 2: standard error output> Operator: Redirects the standard output to a file.>> operator: Attaches the output to a file.|

FTP timed bulk download files (shell scripts and how to use them)

1. Script instanceSave the following script as getftp.sh# !/bin/bash datesign= ' date-d -95day +%y%m%d ' ftp -NV 12.2.2.28 ! Ftprunuser User01 User01 Prompt bin CD TXT LCD /app/info/getftpmget ${datesign}*. Txtbye! FtprunScript

Shell script: Create function and specify directory to download

Write a script:1, create a function, can accept two parameters:1) The first parameter is a URL, you can download the file, the second parameter is a directory, that is, the location of the download after the save;2) If the user-given directory does

Mac Install Shell tool zsh

Automatic installation:Of course, if you trust this open source project author, you can try to use the automatic installation method. wget Https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh-O-| Sh Manual Installation:1.

Special symbols in 1.4-shell

* Wildcard #注释 \ escape Character | Pipe character $ variable character; command delimiter!! Executes the previous command!$ the last parameter of the previous command ~ home directory & Command Background execution> correct override redirect >>

Shell script: If-else

The Shell has three kinds of if ... else statements:1.if. FI statement;2.if ... else ... fi statement;3.if. Elif ... else .... fi statement.If ... fi statementSyntax for the IF ... else statement:if [Expression] Then If Truefi Note: There must

Shell Learning Notes (Org-mode production)

S Shell Learning Note v1.0table of Contents 1. What's shell 2. Hello World Program 2.1. SRC 2.2. Add run Privilege 2.3. Run shell 3. variables in Shell 3.1. System

[Algorithm] Shell sort

Public voidSortint[] list) { intGap = LIST.LENGTH/2; while(1 Gap) { for(inti = gap; i ) { intj = 0; inttemp =List[i]; for(j = i-gap; J >= 0 && temp Gap) {List[j+ Gap] =List[j]; } list[j+ Gap] =temp; } Gap= GAP/2; }}Shell sort,

Mikrotik RouterOS Script-peanut shell dynamic Domain name analysis

1, SETP1Turn on the NTP protocol and modify the time zone:/system NTP Client set Enabled=yes server-dns-names=1.centos.pool.ntp.org/system clock set time-zone-name=asia/ ShanghaiDetects if the route communicates with the dynamic Domain name

Total Pages: 541 1 .... 229 230 231 232 233 .... 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.