"Shell" grep command

2. UseThe grep command in a Linux system is a powerful text search tool that uses regular expressions to search for text and print matching lines. The grep full name is global Regular expression Print, which represents the globally regular

Shell's $

$$: The process ID representing the shell script $!: The process ID representing the last executed shell script $?: Represents the return value of the last executed shell command $*: Represents all parameters in the form "parameter one

Shell script--DHCP Automatic deployment

For more information, refer to:(iii) Play with Me Linux Network service: master server configuration for DHCP service configuration1#! /bin/Bash2ipsag="10.10.10"3dnsip="10.10.10.10"4dn="ns.gr.org"5Cat >/etc/dhcpd.conf 6ddns-update-style

Study Notes (11)--linux Shell Basics

1. Shell Features:To view the command history using the historical command:[Email protected] ~]# historythe user's history record is located in the user's home directory . Bash_history File:[Email protected] ~]# vim ~/.bash_history Quick Actions

Linux Shell Learning Note a directory structure

In the case of Red Hat Enterprise Linux versions, the contents of Rhel are as follows,/bin to store commands used by ordinary users/sbin storing commands that administrators can executeHome directory for ordinary users such as Zhangshan home

Linux Bash Shell One practice:array if else

Shell Practice 11.requireA B C D1 2 3 45 6 7 83 5 8 01 2 4 3After handling:T A B C DA 1 2 3 4B 5 6 7 8C 3 5 8 0D 1 2 4 31.first need read the first line as an array.Then append the element in the proper position for file;oldifs= $IFSIFS =$ ' \ n ';

Turn-shell Implementation Daemon

# #! There is a space followed by a space followed by the full path of the interpreter and must be correct.#! /bin/ashPro_path= ""# Testpro is an executable program to be guarded, which guarantees it is always runningProgram= "Testpro"# This script

Locate files larger than the specified size in the specified directory (LINUX SHELL)

Under current directory:Find./-size +2048k |xargs Du-b|awk ' {print $1/1024/1024 ' M "$ $} ' |sort-n。。。。。。2.53318m./images3545s_.jpg2.53318m./images607s_.jpg2.53318m./image26s_.jpg2.53318m./image2153654s_.jpg2.63534m./images58s_. Jpg。。。。。。。。Avoid

Shell implements a simple process monitoring script

A simple requirement: the shell implements the process monitoring watchdog function, with the scheduled task to execute a shell script every minute, monitor the process, if the unexpected interrupt then start him, if normal, do not need to do

Linux Shell Application Tips

-------------------------------------- Shell application Tips------------------------------------------A command completion: Tab completion shell command two: Clear or ctrl+l clean screen ctrl+u Erase all previous contents of the cursor history

Linux mimics Shell operations

Linux file system is the hard disk space format into a number of node and block data blocks, the creation of general files, directory creation, will occupy a node, if the creation of a file, the specific data stored in a number of block data block,

Linux Learning Notes-11th lesson-shell Basics

1. Historical Order (History,↓, ↑,!) )The default value for history is 1000, which is specified in/etc/profilecommand history, which is used to query recent command histories;Use the arrow keys (↑) to query the previous command;Use the arrow keys (↓)

A quick sort of shell script programming algorithm

#!/bin/bash#shell implementation of the fast sequencing of script programming (with the idea of a meta-point at the far right) a= (8 5 3 2 for 4 1 2 3 + 9 for 8 6) temp=buff= #交换函数swap () {buff=${a[$1]}a[$1]= ${a[$2]}a[$2]= $buff}fun () {i=$ ($1-1)

Shell script programming (merge and sort)

Shell script programming (merge and sort) #! /Bin/bash # shell script sort by merging a = (1 3 5 7 9) B = (2 4 6 8 10 12 14) c = n = 5 m = 7i = 0j = 0 k = 0 while [$ I-lt $ n-a $ j-lt $ m]; doif test $ {a [$ I]}-gt $ {B [$ j]}; thenc [$ k] =$ {B [$

Fast sorting of shell script programming Sorting Algorithm and shell script Programming Algorithm

Fast sorting of shell script programming Sorting Algorithm and shell script Programming Algorithm #! /Bin/bash # implementation of fast sorting in shell script programming (using the rightmost element as the element) a = (8 5 10 3 2 93 4 1 2 3 40 9

Shell script sorting (Bubble Sorting), shell script sorting bubble

Shell script sorting (Bubble Sorting), shell script sorting bubble #/Bin/basha = (9 84 51 0 345 1 2 34 1 0) # define an array temp = for (I = 0; I The above is sorted by a custom fixed array, and the following is a user-defined input array.

Shell script sorting (Bubble Sorting)

Shell script sorting (Bubble Sorting) #/Bin/basha = (9 84 51 0 345 1 2 34 1 0) # define an array temp = for (I = 0; I The above is sorted by a custom fixed array, and the following is a user-defined input array.   #/Bin/basha = 'expr $ # + 1' #

Shell script Sorting Algorithm (Bubble Sorting)

Shell script Sorting Algorithm (Bubble Sorting) #/Bin/basha = (9 84 51 0 345 1 2 34 1 0) # define an array temp = for (I = 0; I The array written above is the array sorting defined in the Code beforehand. The following is the array sorting

Linux commands (while, shell parameter usage), linuxshell

Linux commands (while, shell parameter usage), linuxshell #! /Bin/bash while IFS =: read name1 name2 name3 name4 # IFS is the specified delimiter when reading content from a file: the separate parts are assigned to corresponding variables

Linux shell and shell

Linux shell and shell -------------------------------------- shell application tips ------------------------------------ command completion: tab key completion shell command 2: clear or ctrl + l clear screen ctrl + u clear all the content before

Total Pages: 541 1 .... 488 489 490 491 492 .... 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.