Linux Shell Letter Conversion notation

#!/bin/sh #---------------------------------------------------------- # [: Upper:] [A-z] # [: Lower:] [A-z] # [:d igit:] [0-9] # [: Alnum:] [0-9 A-z] # [: Space:] spaces or t a b keys # [: Alpha:] [A-A-z] #------------------------------------

How Linux uses the shell to see if Linux is 32-bit or 64

Now the vast majority of users are using the Windows system, all know that the Windows system has 32-bit and 64-bit, in fact, the Linux system also has 32-bit and 64-bit, you know your Linux system is a few? Here's how you can use the shell to see

shell--Segmentation file Name

Example: 1. File_jpg= "Sample.jpg" name=${file_jpg%.*} echo File name is $name File name is sample 2. File_jpg= "Sample.jpg" extension=${file_jpg#*.} Echo Extension is $extension File name is jpg 3. File_name= "www.google.com" Echo

Shell to process filename instances with spaces _linux shell

There was a problem working with files today, and the for loop is problematic when the file name contains spaces. For example, I create 3 files in the current folder that contain spaces: Copy Code code as follows:

Realization of common sort algorithm (ii.)-shell sorting

The shell sort is a modification to the insertion sort, it divides the elements of the sequence into several subsequence by an increment each time, inserts a sequence of these substrings, and then increments the number of elements in each

The shell problem that the netizen encounters in the work

The shell problem of the user's work: Problem Description: You need to intercept the certificate encoding information for the following command output: #openssls_client-showcerts-connect192.168.0.111:443|sed-ne

Shell Basic Syntax 2

Automated deployment and monitoring of development scripts1. Scripting automatic deployment of reverse proxy, web, NFS;Requirements: I, the deployment of Nginx reverse proxy three Web services, scheduling algorithm using weighted polling;II, all Web

Loop of shell scripts: repeating commands

Loop of shell scripts: repeating commands1.for CycleGrammar:For variable name in variable Value listDoCommandDoneFor based on the contents of the variable Value list, executes the command repeatedly until all the contents of the Variable Value

Some of the special symbols and functions that are common in shell scripts

In writing shell scripts, we need to use a variety of special symbols, through these special symbols can make the code we write more concise and efficient, here are summarized below:1. {} curly braces:Usage One: Wildcard extensionEg:ls

Package shell scripts into RPM packages

The next best thing to do on a virtual machine: Docker is the most convenient1. Installing RpmbuildYum-y Install Rpmbuild rpmdevtools-y2. Generate a package pathWith Rpmdev-setuptree, a Rpmbuild folder is automatically generated in the user's home

Shell Script Execution

Method One: Switch to the directory where the shell script executes the shell script:cd/data/Shell. /hello.shThe./means to execute hello.sh under the current working directory. If you do not add./,bash may respond to an error message that could not

Shell Command Summary

Encountered a remember a1, omit sudoUsing the Su-i command after landing with the primary user will log in as root in the shell, then the command will not need to add sudo and password. Another user has tried, Su does not have the-i option. Online

Comparison of if judgments of the shell

The IF function in the shell is beyond doubt that every 80% of the shells will be applied to if judgment, then as a novice I should be the whole, I heard a morning class today, and then the morning's things summed up a script, and then to the people

Linux-shell First Lesson

Linux-shell First Lesson1, through a small example to introduce the shell#! /bin/sh Call Sehllecho Print content read input cd jump directory pwd View current directory650) this.width=650; "title=" 1.jpg "src=" https://s5.51cto.com/wyfs02/M00/8D/EA/

Shell Programming Basics-sendmail

Installation of the Linux SendEmail tool 1. Download the file #wget http://files.cnblogs.com/files/sunziying/sendEmail-v1.56.tar.gz2. Installing #yum Install SENDEMAIL3, main parameters:-F is the From, the sender address-t means to, the recipient

A summary of Shell judgment problems

#!/bin/bash#比如需要判断一个变量是否含有值:if [[ -z $1 ]] ; thenecho "Something like empty!"exit 0;fi#判断上一条语句是否执行成功if [[ "$?" -eq 0 ]] ; thenecho "$1 更新成功."exit 0;fi#下面再举一个实例NovaPath=”/home/malu/”NovaFile=”/home/malu/access.log”#这里的-x parameter determines whether $

Shell Programming for Loop

1. Grammatical structure2. Case studies2.1 Batch Decompression#!/bin/bashcd/root/test/ls *.tar.gz > Ls.logls *.tgz >> ls.logfor i in $ (cat ls.log) do tar-zxf $i &A mp;>/dev/null donerm-rf ls.log~

Use shell scripts on Linux to view memory conditions (super-practical)

#!/bin/bashExport Chknum=1#shell搅拌存放目录 (The output log file is also stored in the directory after it is executed)Echo 3 >/wls/wls81/shellSyncWhile [$chknum-ge 0]Doecho "-------------------------------------------------------" >> Trace.logmt= ' Free |

Arrays in the shell

How to compile Bash execution(1) Bash test.sh(2) chmod 755 test.sh #给bash赋予可执行的权限 r-4 w-2 x-1./test.shBash supports one-dimensional arrays (which do not support multidimensional arrays) and does not limit the size of arrays. Similar to the C

Array base syntax in shell

Basic assignment of an array Arr= (a b C) Arr[index]=a 2. Two common methods Str=${arr[@]} (array converted to string) len=${#arr [*]} (array length) 3. Ways to

Total Pages: 541 1 .... 457 458 459 460 461 .... 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.