A fun Linux shell script __linux

A fun Linux shell script, the basic idea is to loop the call Cowsay The effect is as follows ------------------------------------------------------------------------Gorgeous split Line------------------------------------------ -----------------------

SHELL syntax error:unexpected end of file hint error

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.

Linux Classic Shell command finishing __linux

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"

The shell script automatically telnet and executes the remote machine script

The shell script automatically telnet and executes the script simple usage of the remote machine [plain] #!/bin/sh (sleep 10;    echo "username";    Sleep 10;    echo "Password";     Sleep 10;    echo "PWD";     Sleep 50; #echo exit) |telnet $ip

The \ r character in the shell script.

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

Shell's PS command parameter list explanation

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

Shell Script set command

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

Configure your own Shell under Mac

Mac uses Iterm[https://www.iterm2.com/] ()1. 安装iterm2 2. 使用oh-my-zsh wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 3. cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc4. vim ~/.zshrc ZSH_THEME="robbyrussell"

9-shell echo Command

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

What does a double colon mean in a shell script?

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

Linux Bash shell string split substring etc (RPM)

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

How to write a simple shell script.

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

Shell Script Basics

Programming Basics:Program: Instruction + dataProgram Programming Style:Program: command-centric, data-serving instructionObject type: Data-centric, instruction serves dataShell Program: Provides the programming capability to interpret the execution.

Shell Scripting Learning

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": ' .*-> \ (. *\) $"

The Column-aligned field of the shell command

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]

Daily Shell Exercises (05)--Batch package files

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

Shell periodically transfers log files to cloud disk and periodically deletes cloud disk files

The shell script is processed periodically as follows: Cat /home/backup/logs_delete. SH #!/bin/bash/bin/find"*.log*" -mtime +4 -type f| Xargs mv {}/mnt/logs/nginx//bin/find"*.log*" -mtime +30 -type f| Xargs RM-L04 * *

Use of SED tools and regular expressions (Shell fourth day)

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

Functions, arrays, alarm system scripts in the shell

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

New Peanut Shell +tomcat released Javaweb project "pro-Test effective"

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

Total Pages: 541 1 .... 261 262 263 264 265 .... 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.