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

Basic knowledge of shell scripts 1: compilation of basic scripts

1. Use multiple commands To run multiple commands together, you only need to input them to the same line, separated by semicolons. Ex: data; WHO 2. Create a script file (1) #! /Bin/bash is the first line (2) # Add comments. (3) Each line

Personalize your shell prompt

I saw a command line prompt from my colleagues on my system (Linux), which had a color and smiling face. I think it's cool, and I also copied it, Display Policy: current user, time, current directory, If a common user displays a smiling face,

Shell parameter Introduction

$0 = Shell Name or shell script name $1 = first shell parameter ... $9 = ninth shell parameter $ # = Number of location parameters "$ *" = "$1 $2 $3 $4 .. $ N" "$ @" = "$1" "$2" "$3" "$4"... "$ N" $? = Exit status of the recently executed command $ =

Shell script learning-1

1. write scripts. You can use shell and Perl. Find 100 files starting with ABC in the/tmp directory, and save the first line of these files to file new.2. write scripts and use shell and Perl. Put all the rows in file B but not in file,Save as file

Bash command and shell script Summary (3) command

@ Rigorous use of set @ Set-eux -E. If the command returns a non-zero value, exit immediately. -U when the execution parameter is included, the unset variable is used as the error handling (if the extension attempt appears in the unset variable, the

Shell programming-Day 2

Ls-l dir1 | WC-L. 1. While condition; do done // () [] Test2. Until is the same as above. It is executed only when the condition is not true.3. /Dev/null: Unix black hole. Used to clear the file CAT/dev/null> XX find-name a.txt 2>/dev/null4. Note:

Search for shell scripts that replace text in multiple files in Linux

Use Find and SED # First query the number (sed-N) Find.-Name '*. htm' | xargs sed-n'/old/P' # Replace (sed-I) Find.-Name '*. htm' | xargs sed-I's/old/new/G' Use grep and SED Grep-l old *. htm | xargs sed-n "/old/P"Sed-n'/old/P' grep-l old *.

Linux system resource load is too high and Apache shell script is automatically restarted

Linux system resource load is too high and Apache shell script is automatically restarted   When we routinely maintain Apache Web servers in Linux, the endless loop caused by crawler crawling cannot jump out, or the collection of data from peers

Shell condition judgment Summary

-B file: if the file exists and is a special block file, it is true.-C file: if the file exists and is a special character file, it is true.-D file: if the file exists and is a directory, it is true.-E file: true if the file exists-F file: if the

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

Shell script FAQ

Document directory Determine whether the file is a device file Add User: IP address access statistics: Calculate the sum of 2 numbers Text Analysis File Sorting Print the swap partition size of the Local Machine Output the time used to

Linux Shell study note 4

6th hours Process 6.1 start a process In UNIX, whenever a command is executed, it creates or starts a new process. For example, when you use the LS command to list a directory, a process is started.   The operating system uses a five-digit ID called

Linux Shell study Note 5

Lesson 6 variables Part 2 shell programming 7.1 define variables Format: Name = value # Note: there cannot be spaces on both sides of the equal sign! This is different from other scripting languages: value can be defined as a variable value without

Linux Shell Study Notes 10

14th class hour Functions 14.1 create and use functions Format: Name () {list ;}   An important feature of Shell functions is that they can be used to replace binary executable files or shell built-in commands with the same name. For example: CD () {

Linux get time in Shell

Obtain the date of the current day Date + % Y-% m-% d Output: 2011-07-28   Assign the current date to the date variableDate = $ (date + % Y % m % d) Sometimes we need to use the date before or after today, then we can use the-D parameter of

Common system variables and condition judgment in Shell

Common System Variables$0 name of the current program$ N the nth parameter of the current program, n = 1, 2 ,... 9$ * All parameters of the current program (excluding the program itself)$ # Number of parameters of the current program (excluding the

Shell script learning-7 (SED command learning)

Example 5 insert some content after some strings [Rocrocket @ rocrocket programming] $ cat mysed.txtBeijingLondon [rocrocket @ rocrocket programming] $ SED's/B. */& 2008/'mysed.txtBeijing2008London The purpose of this command is to add the following

Android ADB shell cannot be started: insufficient permissions for device Solution

My platform: Ubuntu 10.04Solution 1:Lsusb, view the vendorid, and add or modify the 51-android.rules file in the/etc/udev/rules. d/directory.Add a record:Subsystem = "USB", sysfs {idvendor} = "XXXX ",Mode = "0666" where XXXX is the value obtained

Start a shell script in APK

In Java, you can call the Execcommand method to run the shell script. The following is an example: 1 .#! /System/bin/sh 2. # The simplest shell with no function 3. # It must be noted that #! Start with/system/bin/sh (with spaces) 4. # different from

Total Pages: 541 1 .... 486 487 488 489 490 .... 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.