Learn Shell script Diary

linux,shell2015-02-07    1. Scheduled tasks: Corntab-e writing Scheduled Tasks     CORNTAB-L viewing Scheduled tasks       Corntab-r Clear all Scheduled Tasks            If you want to clear a scheduled task, you can go to the edit page of the

Linux Shell determines whether files and folders exist

The shell determines whether the file, directory exists, or has permissions#!/bin/sh mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" #这里的-x parameter Judging $ Whether the MyPath exists and has enforceable permissions if [!-X '

Shell--SED usage

Sed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the following first understand the use of SEDThe SED command

Shell-cut usage

The Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# cut-d ' delimited characters '-f fields [[email protected] ~]# cut-c character range Options and Parameters:-D: followed by delimited characters.

Shell First lesson study notes

Shell First lesson study notes What do you mean shell?The shell is a command interpreter that, at the outermost layer of the operating system, is responsible for directly talking to the user, explaining the commands entered by the user to

Post a shell code

Long time no shell, hehe#!/usr/bin/EnvBashcounter=1 while[$COUNTER-lt + ]; DoEchoThe counter is $COUNTERCat>Tmp.sqlinsert into"Wcdata"VALUES ('' (printf "%03d" $COUNTER) '','0.00','0.00','0.00183','85.47943','4773267.7216','-10669.18'); EOFEchoThe

Linux shell switching

If you need to modify the default shell (typically the bash shell), use it handy. Check the shell types available for your system first[email protected] ~]$ chsh-l/bin/sh/bin/bash/sbin/nologin/bin/tcsh/bin/csh/bin/kshModify the current shell[email

Auto-Interaction in Pect-shell

This is the automatic landing SSH script I wrote in St, divided into two filesFile 1:sssh#!/bin/bash#xql 2011/01/4#auto SSH 138.198.230.170Case$Inch "Xql")Sssh.exp XQL ;; "Root")Sssh.exp Root ;; "31" ) SSH [ Email protected]10. 80.117. ; "40" )

Shell Script Basic Syntax

the meaning of several symbols$#: On behalf of the following parameters "number", the above table as an example of this shows as "4";[email protected]: for "$" "$" "$" "$" "$4" means, each variable is independent (enclosed in double quotation marks);

Shell Learning Notes--awk usage

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/4C/wKiom1St7-jhv5MEAAJw30MjWNA274.jpg "style=" float: none; "title=" QQ picture 20150104161512.png "alt=" Wkiom1st7-jhv5meaajw30mjwna274.jpg "/>650) this.width=650; "src=" http://s3.51cto.

Introduction to Linux Shell

A shell is a program that has a special function that can be understood as an interface that users interact with the kernel. We know that the kernel is the heart of Linux, and the kernel is switched on and left in memory when it is turned on. Other

Basics of learning shell scripts (i) (Learning to record posts)

Record command history: The commands we've knocked on, Linux will have a record, saved in the. bash_history file in your home directory. (Note: The current command will be saved in the. bash_history file only if the user exits the current shell

Batch create thumbnails under Linux shell

I. BACKGROUNDToday, suddenly found that the latest news thumbnails on the mobile client are not displayed, on the server looked at,Discover that new news images do not generate thumbnails at all.This set of news release system is very old program,

The entry of the shell script

shell script parameters can be as many as possible, but only the first 9 can be accessed, using the shift command can change this limit. The parameter starts at the first and ends at the Nineth one. $ A program name$n Nth parameter value, n=1..9$*

Linux Shell Basics

  The bash shell itself does not support regular expressions, and the use of regular expressions is shell commands and tools such as grep, SED, awk, and so on;However, thebash shell can use some metacharacters in the regular expression to implement

Linux Shell Script Raiders Note sixth: packaging compression

Linux Shell Script Raiders notesSixth chapter: Packing Compression1, package, unpack [[email protected] program_test]# tar-cf output.tar 11.txt 22.txt 33.txt [[email protected] program_test]# Tar- XF output.tar-c./tar-file///-c Specify which path to

Shell Array Summary

1. Calculate the length of the array:${#array [@]}2. List the array index:${!array[*]} or ${!array[@]}3. Print all the values in the array:${array[*]} or ${array[@]}Iterate through the array elements in 4.shell:For STR in ${array[@]};DoEcho

Linux shell reads files by row,

Linux shell reads files by row,One way is to use cat and reverse quotation marks. Ps: reverse quotation marks play the role of command replacement in Linux. Command replacement means that shell can insert the standard output of a command to any

Frequently used shell commands (updated in succession) and shell commands

Frequently used shell commands (updated in succession) and shell commands It's just something that I often use, not comprehensive. 1. Obtain the returned values before the MPs queue. Echo $ {PIPESTATUS [0]} E.g. root@node2:~# date1 | echo 22No

Shell programming cut, shellcut

Shell programming cut, shellcutCut refers to the unit of action in the file. Based on the conditions you set, part of the content is cut and printed out. Output to standard output, not saved to any file-B Range: determined by byte range-c range:

Total Pages: 541 1 .... 476 477 478 479 480 .... 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.