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

Three different methods (fork, exec, source) for calling another script in shell scripts)

Fork Usage: fork/directory/script. Sh Fork is the most common. It uses/directory/script. Sh directly in the script to call the script. Sh script. Run a sub-shell script to execute the call. When Sub-shell is executed, parent-shell is still

If parameter in shell script

[-A file] true if the file exists. [-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

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,

Usage of Shell functions and source commands

The source command can load another script in one script. The following is an example: First, we define a function script named myfunc. Sh, as follows: #! /Bin/bashFunction Square{Local tempLet temp = $1*$1The sum of squares of Echo "$1 is: $ Temp"

Linux Shell programming notes

  #/Bin/bash 1, Wildcard *: Match any character or string, including an empty string. ? : Match any character. For example :?ABCCan match anyABCIt is a string of four characters that can be switched to or from any character. […]: Match any single

Chgrp of shell commands

root@bt:~/test# chgrp --helpUsage: chgrp [OPTION]... GROUP FILE... or: chgrp [OPTION]... --reference=RFILE FILE...Change the group of each FILE to GROUP.With --reference, change the group of each FILE to that of RFILE. -c, --changes like

How to calculate the intersection and difference set of two files in Linux Shell

Assume that the two files file1 and file2 are represented by a and B. The content of file1 is as follows: A B C E d The content of file2 is as follows: C d A C There are basically two methods: one is the comm command and the other is the

Shell script notes

#! /Bin/sh# The first line is to tell the system who will execute this dumb. $ ## Number of parameters transferred to the script$ # ID of the current process during script running, often used as the suffix of temporary variables, such as haison. $$!

Linux Shell: Test Command Parameter Parsing

Format: Test conditions Test-N string: string is not emptyTest-Z string: string is empty Test int1-EQ int2: int1 = int 2Test int1-ne int2: int1! = Int2Test int1-GT int2: int1> int2Test int1-ge int2: int1> = int2Test int1-lt int2: int1 Test int1-Le

Shell basic notes

Note: No space is allowed between the left and right sides of "=". The semicolon program 1 # is not required at the end of the bash statement #! /Bin/sh # echo somethingecho "Hello World" Echo "Hello !! "CD/root/export topmkdir./ABC Program 2,

Shell (10) commonly used command. Doc

Ls -L, show the hard link count; -I, show I-node -H, human readable -T, sort by modify time -S, sort by size -R, -- reverse -R, show content of sub-Dir -V, sort by version  CP -P,Retain source file attributes, such as the modification time -L,

Here document in Shell

1. Glossary: The following is Wikipedia's explanation: Here document[1], also known as heredoc, hereis, here-string or here-script, is a shell (such as SH, CSH, KSh, Bash, powershell, and zsh) in the command line) and define a string method in 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 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 () {

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

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.