A fun Linux shell script, the basic idea is to loop the call Cowsay
The effect is as follows
------------------------------------------------------------------------Gorgeous split Line------------------------------------------ -----------------------
If [-N ' $]Thenecho "111"Elseecho "222"FiExit 0Execute SH my.sh par hint syntax error:unexpected end of file. Error excuse me.
Text editing is a file written by Notepad under Windows, running under the Cygwin simulation Linux software environment.
Http://www.ha97.com/4021.html
1. Delete 0-byte filesFind-type f-size 0-exec rm-rf {};
2. View processArrange by memory from large to smallPS-E-O "%c:%p:%z:%a" |sort-k5-nr
3. By CPU utilization from large to small arrangementPS-E-O "%c:%p:%z:%a"
On Windows with notepadd++ edit a shell script, die or die, back to Linux, edit, or have this \ r, search the next, is this:
http://bluemood.blog.51cto.com/1142811/1030925
‘
because the shell processed the character file in Windows, the string
Usage:ps [Options] Basic options:-A,-e all processes-a all with TTY, except Sessio N leaders a all with TTY, including and users-d all except session leaders-n, --deselect Negate selection R only running processes T all processes on this Terminal
The set command sets the parameter variables for the shell. The output of many commands is a space-delimited value, and using set is very effective if you want to use one of these data fields.
#!/bin/shecho the date is $ (date)Set $ (date)echo the
Shell echo CommandThe echo command of the Shell is similar to the echo command of PHP, and is used for the output of strings. Command format:echo stringYou can use echo to achieve more complex output format control.1. Display normal string:echo "It
This is the code development style, in fact, is a function name, equivalent to the underscore division, but read into the package name after the meaning of different. This is defined in accordance with Google's shell development
Original 52779364The problem with script development is that the string splitting operation in the original Java (substring indexof, etc.) does not know what to do (e.g./a/b/c/d.txt I want to know the name of the file)Query information that the
The shell itself is a program written in C, which is a bridge for users to use Linux. The shell is both a command language and a programming language. As a command language, it interprets and executes user-entered commands interactively, and as a
Startup script start.sh This script is used to start the project, log logs and PID#!/bin/shprg=" $" #$ A represents the current startup script # Get the true path of the file while[-H"$PRG"]; Dols= ' Ls-ld"$PRG"' link= ' Expr"$ls": ' .*-> \ (. *\) $"
You can convert text results to neat tables, upper and lower commands: ColumnParameters to use:-T: Table with a space interval by default-S: Required with-t use, specify delimiter?Monitor Ogg named field alignment
[[Email protected]
1. ExercisesFind all files with the suffix. txt in the/123 directory
Bulk Modify. txt to. txt.bak
Package all. bak files into 123.tar.gz
The name of the batch restore file, that is, to remove the added. Bak again
2. Exercise
Sed tool "streaming editor"--Non-interactive, filter based on pattern matching and modify text--progressive processing and output of the results to the screen--can achieve the output of the text, delete, replace, copy, cut, import, export and other
1. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call thisThe name of a small unit.Format: function F_name () {Commond}function must be placed at the
First, new peanut Shell 1.0On the Peanut Shell official website (http://www.oray.com) Download "New Peanut Shell 1.0" installation software, software installation completed, need to register, after the successful registration of Peanut Shell website
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