Some small shell scripts

JudgeProgramWhether it exists, and start its #! /Bin/sh Echo-e "\ 033 [32 m redmine starting \ 033 [0 m"Redmine-2.1.4/CD/u02/Ruby script/rails server webrick-e production-dVar = $ (PS-Ef | grep Ruby | grep-V grep | WC-l)If [$ var-GT 0]ThenEcho-e "\

Write shell output to a file in Linux

As you know, you can use shell to output information to the screen. However, if the output content is too large and redundant, it is not easy for us to analyze and extract the screen information we want, so how can I write shell output into a file?

Run shell commands out of the terminal in the background

Have you ever encountered such a situation: from the remote Linux environment of the software, you have compressed a large pile of files into a .tar.gz file, which has not been completed for half an hour in a row. Then, suddenly you are disconnected

In Windows 7, emacs 24 shell uses gitbash

Today, we found that gitbash can be directly opened in shell. gitbash provides some useful Linux-style commands. The most important thing is that you do not need to open another gitbash terminal to manipulate git when using Emacs. In ~ The

[Shell for Android automated testing] 01. Records of common android shell commands

1. Android command line host operation ADB push c: \ Users \ Xiaopeng \ Desktop \ hosts/system/etc/hosts Import ADB pull/system/etc/hosts E:/host.txt Export View CAT/system/etc/hosts 2. Print the log for tag filtering through the command

-Shell string Truncation

Http://tech.foolpig.com/2008/07/09/linux-shell-char/ Shell string truncation problem:1. Linux Shell intercepts the first eight characters of the character variable by using the following methods:1. expr substr "$ A" 1 82. Echo $ A | awk '{print

Shell programming technology and example-Linux Kernel Analysis and Operating System Design

Although he does not know who Lu Jun is, his book is indeed easy to understand and has the meaning of training materials.. Linux Shell programming started from UNIX and was presented as a human-computer interaction tool in the early days. After

Shell script for Linux Learning

How to run a script Three methods: Absolute path:/tmp/shell. Sh Relative Path:./shell. Sh Variable path: Put the directory where the script file is located in path, and then shell. Sh     Below is a simple script And learn anyProgramming

Linux Shell study Note 6

8 hours reference Terms Reference: The selected text is enclosed by some type of reference tag, so that the selected text becomes a text character.   Escape: escape a character means that a backslash (/) is added before the character to escape

FTP folder transmission shell script

######################################## ######################### ######################################## ######################### Ftp_download_file (){ EchoEcho begin: Download $1: $2...Echo Sleep 0 FTP-I-n Open $1User administratorBinMget

List of Common Unix shell commands

List of Common Unix shell commands Passwd Change User Password PWD print current directory CD change Directory ls list directory file wildcards *,? Any number of characters and a single character file print out the file type cat display

Shell for Linux Learning

What is shell? Shell is an interface for user interaction with the kernel. It can be used as a command interpreter. After a user inputs a command, shell will explain it and then send it to the kernel for execution,   After knowing what shell is, let

Common Methods for shell to process strings

rfc

Reprint: http://www.51testing.com /? Uid-225738-action-viewspace-itemid-218002   ShellProcessing StringMethod (for future reference) 1. Construct a string Direct Construction Str_zero = Hello Str_first = "I Am a string" Str_second =

Time Command in Shell

Forwarded from blog: http://www.51testing.com /? Uid-390472-action-viewspace-itemid-232903   TimeCommand is used to print the execution time of a command or program.Time The time, system time, and time used in the execution of a command in

Write shell code

Write shell code The following is a shell C program shellcode. C: (this article takes Linux on intelx86 as an example) Void main (){Char * name [2]; Name [0] = "/bin/sh ";Name [1] = NULL;Execve (name [0], name, null );} Compile it as the Execution

Linux Shell study Note 3

  File Attribute operations in Lesson 5 File attributes include: 1) Permission 2) Owner 3) Group   5.1 file type 5.1.1 determine the file type To determine the type of a file, you can add the-L option to LS. All types are listed. For example: $ LS-L/

Linux Shell study notes 7

The eighth Condition Statement 10.1.1 is a simple if statement $ if 3> 2; then Echo 3; else Echo 2; FI # This is the form of $ cat> test in the command line. sh #! /Bin/shif 3> 2; thenecho 3 elseecho 2fi10. 1.2 use the test format: Test expression

Linux Shell study note 9

12.3 option analysis in shell script The first method is to use the case statement for manual processing. Method 2: Use the getopts command to analyze the options Syntax format: Getopts option-string variable Option-string is a string that contains

In Linux, shell scripts output color text

The color of the text terminal can be generated using an ANSI unconventional character sequence. Example:   Echo-e "/033 [44; 37; 5 m me/033 [0 m Cool"   The preceding command sets the background color to blue, the foreground color to white, the

Bash instance, Part 1-basic programming of Bourne again shell (BASH)

By learning how to program using the bash scripting language, you can make the daily interaction of Linux more interesting and productive. You can also use the familiar and favorite standard UNIX concepts (such as pipelines and redirection ). In

Total Pages: 541 1 .... 498 499 500 501 502 .... 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.