Linux Shell Learning

Shell Features:History is saved in ~/.bash_hostory and retains 1000 records: defined inEcho $HISTSIZE!: Previous Command!$: Last parameter of previous command! 950: No. 950 order!c: The most recent command in history that starts with CTAB: Command

Intra-enterprise network segment detects how many hosts survive--shell script Pass (ii)

Intra-enterprise network segment detects how many hosts are alivePreface: This script originally came from watching the network class Gou Qi 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0058.gif "alt=" J_0058.gif "/> The space release

Application of eval in shell

Application of eval in shellEval can be used for nesting of variablesDr=ddir$inumEval ssdir=$ (Echo \$ $SR)Example:#!/bin/bashDate= ' Date +%y%m%d

Linux Shell wildcard character (globbing)

A wildcard is handled by the shell, and it appears only in the parameters of the command (it is not used in the command name or on the operator). When the shell encounters a wildcard in parameters, the shell treats it as a path or file name to

Shell script to GG

==================================================#!/bin/bashsqlplus=sqlplus64username=$1psswd=$2filedir=$3[[$ Filedir] | | Filedir= "/sandbox/edf_api_repo_dir" [[-D $filedir]] | | {echo "mkdir $filedir"; mkdir $filedir; chmod 777 $filedir;} [-D

Linux Rman Shell

# make direcory for backset file and scripts file,in my Case/backup/db_bakCd/backup/db_bakmkdir Scripts Logs Rman# The following is contents of Rman_backup_shVi/backup/db_bak/scripts/rman_backup_sh#!/bin/bash# author:anbob.com# Desc:rman Backup

Shell's Gollum installation + comment

#!/bin/bash#by lcpanduan () {if [ $? -ne 0 ]then  echo  "=========== ====$1 not ok ==================== "  exit 1fi}function checkroot () {   if [  ' Id -u '  -ne 0 ]  then     echo   ' pleases do this  ' su -"'  &&     exit 1   fi}function tarruby (

Shell Programming for Linux

Basic knowledge of Shell programmingThree ways to empty a log1.echo Cary >test.log>test.log2.echo Cary >test.logEcho >test.log3.echo Cary >test.logCat/dev/null >test.logShell scripts are good at working with plain text type data, while almost all

Batch renaming with Shell

Batch Create files first#!/bin/shif [!-d/tmp/Chenyao]then mkdir /tmp/chenyao-p fi /tmp/Chenyao for in {1.. Ten }do touch chenyao-$i. html doneBatch Renaming[Email Protected]amp scripts]# cd/tmp/chenyao/[email protected]

The shell connects two scripts.

Tag: The shell connects two scripts.#!/bin/bash##This is for auto run the script to save the time##By [email protected]#chose the latest file and chose one to runarray[0]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n '

Shell Primer-awk-2

The conditional operator of awkShows the first line with root[[email protected] ~]# awk-f ': ' $1== ' root ' 1.txtRoot:x:0:0:root:/root:/bin/bashShow first line with root print first paragraph[[email protected] ~]# awk-f ': ' $1== ' root ' {print '}

Corrupted Linux/home folder, using Shell to quickly recreate

Problem Description:LAN built Hadoop Environment, node/home is mounted on a separate disk, a power outage causes several node/home file system corruption, unable to recover, only after formatting and re-mount home/home, and then use the script to

Shell Primer-grep Filter-1

The regular expression is a string. There is a certain pattern. We use the specified string to match a specified line. The specified string is the regular expression.Regular expressions have these tools: grep egrep sed awkCommand: GerepDescription:

Shell Getting Started-cut command

Command: CutOption:-d:-f Specifies the segment divided by ": (separator)" In the first paragraph-c Specifies the number of charactersDescription: Select the command, select a piece of data we want, generally for each row to analyze the

Shell Script Programming Basics

1. Create shell script file     Create file, add executable permission to file chmod +x file    format: Specify the shell        #! in the first line of the file /bin/bash    NOTES: #开头的命令 (except  #!/bin/bash  in the first line)     Display message:

Shell Primer-shelltexing

1. About!Command:!!Description: Executes the previous command[Email protected] ~]# pwd/root[[email protected] ~]#!!Pwd/rootCommand:! N (n = number)Description: Executes the nth command in the command historyExtended command: HistoryDescription: View

Shell Script Case Analysis

#!/bin/sh### globalsimg_ext= "{png,jpg,gif}" sql_file= "My_images_mysql.sql" sql_ins= "INSERT INTO  images values  ("Sql_imageid_range=0sql_imagetype=1sql_name=" "sql_image=" "### ERRORNORMAL=0ERR_ Args=1err_no_dir=2err_no_file=3retval= $NORMAL #####

A simple shell.

Recently, follow the MIT operating system engineering Course (6.828/fall 2014) to write a simple operating system from scratch.Job 1 of the first lesson is to write a simple shell that can run the command and Support redirection (' > ', ' The source

Shell 13 Ask

1) Why is it called a shell?From the user's point of view, the user is not able to directly manipulate the kernel, but through the kernel "shell" program, known as the shell, to communicate with kernel.1 different operating systems use different

Sort of hill sort (shell sort)

Objective  This blog is based on the blog of the Brothers, the blog address click on it can go in, there are many good blog, my sorting algorithm is from this; some of the concepts of data architecture I will not elaborate on, Wu fan's blog is

Total Pages: 541 1 .... 354 355 356 357 358 .... 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.