Linux shell command

Cat/proc/meminfoCat/proc/cpuinfoIpcs-aIpcs-mIpcs-sIpcs-qMkdir-p name when the parent directory does not exist is to create itINFOCMP VT100Echo $TERMXtermKonsoleGetconf Long_bitArchRelease= ($ (Lsb_releaseCD-RZ szecho $PS 1Ls-f (after the directory

The Shell of Linux

One: Shell conceptThe word shell is unfamiliar, meaning "shell" is a layer of interaction between the OS core and the user, in a Linux system, the user can use the command terminal, the shell command down to convey their wishes,Drive kernel to

Shell programming (13) --- WHILE LOOP

The while loop is applicable to scenarios where the number of loops is unknown.Syntax format: While conditiondo statement ...... Done Note: While is used to execute a loop when the condition is set up. When the condition is invalid, the loop is

Shell scripts refresh data without line breaks

#! /Bin/bash While[1] Do A = $ (ifconfig eth0 | grep'Rx PAC'| Awk'{Print $2 }'| Awk-F:'{Print $ NF }') Echo-ne"$ A \ r"# Refresh data without line breaks Done Echo Parameter number:-N. Do not wrap the line at the end.-E

Shell script parsing 6 ---- case statement

The case structure in bash, which can be used for multiple branches.Case "$ Var" inCondition1);;Condition2);;*)Default statments ;;EsacFor example:#! /Bin/bashEcho "hit a key, then hit return"Read keypressCase "$ keypress" in[A-Z]) echo "uppercase

Shell script parsing 7 (Exercise 1) ----- Script Parameters

#! /Bin/bashA = $1 # pass the first command line parameter to variable A, and the second command line parameter to BB = $2If [-Z $ A] | [-Z $ B] # determines whether a and B are empty. If one is empty, print the prompt statement and exit.ThenEcho

Shell script Practice Notes (6) -- Cluster Environment configuration Detection

  1). Background:During cluster deployment, consistent configuration and environment settings are required. for Virtual Machine clusters, you can copy, copy, and restore cluster machines by using images. different from physical machine clusters, if

Shell script parsing 5 ---- loop statements

I. For LoopFor VaR in [LIST]Do# Code blockDone$ VaR is a loop control variable. [LIST] is a set that VaR needs to traverse. The do/done pair contains the loop body. If do and for are written in the same line, you must add ";" before do, for example,

Shell script parsing 2 ---- variable

I. general Variables #/Bin/sh Num = 2 Echo "this is the $ {num} Nd" # If the shell script language variables are tightly connected to letters, add. Output result: Ii. System Variables $ #: Number of command line parameters for input scripts

Shell script parsing 3 ----- local variables and functions

#! /Bin/bash Hello = "var1" Echo $ hello Function func1 # define function func1 { Local Hello = "var2" # define the internal variable hello Echo $ hello } Func1 # Call a function Echo $ hello Execution result: Conclusion: local variables only work

Shell $ (), '', $ {}, $ (), and (())

Tag: $ {} ''$ () Shell $ (), ''For command replacement $ {} Is used to replace variables (the following content is from shell 13) (1). Definition of Variables         $ A=B        $ echo $AB When executing this command, the AB is regarded as a

Shell operations of HDFS

Since HDFS is a distributed file system for data access, operations on HDFS are basic operations on the file system, such as file creation, modification, deletion, and modification permissions, folder creation, deletion, and renaming. Pair HDFS

Shell programming Basics

(1) it must start with the following line (the first line of the file must be placed ):#! /Bin/shSymbol #! The program used to tell the system to run the script. This example uses/bin/sh. After the editing is completed and saved, it is assumed that

Bash/Shell mathematical computing

$ echo $((20.0/7))$ zcalc$ bc REF:http://unix.stackexchange.com/questions/40786/how-to-do-integer-float-calculations-in-bash-or-other-languages-frameworks

Practical shell compiling case

1. you can set the number of servers to be checked and the server to check. You can set the IP address of the non-Online host and the corresponding time of the non-Online host, and collect statistics on the number of non-Online hosts saved to the

Shell script creation tool

Every time you create a new script, you must add # In front of the script #! Some fixed text such as/bin/bash. The bash Script Creation script can automatically add information such as Bash and date author. After the creation is complete, the system

Tr command for Shell Learning

The TR command does not accept specified file parameters, but only translates standard input. tr is short for translate, that is, translation. Note that it cannot translate sentences, only one character can be translated. First, define the variable:

Shell script execution and basic knowledge

After we grant the shell script execution permission, we can test the program. Assume that the shell script file is hello. Sh.In the/root directory. The following describes how to execute shell scripts on a terminal:1. Switch to the directory where

Shell script-learn a little shell every day

TR is used to delete control characters in a file or convert characters.Syntax: TR [-C/D/S/T] [set1] [set2]Set1: Character Set 1Set2: Character Set 2 -C: complement. Use set2 to replace characters not included in set1. -D: delete all characters in

Rotate the Shell Part Template

mul

Convex hull diameter Detailed description of convex hull diameter // Calculate the convex hull diameter. Input convex hull Ch. The number of vertices is N, which is arranged counterclockwise. The square of the output diameter Int rotating_calipers

Total Pages: 541 1 .... 396 397 398 399 400 .... 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.