Overview of Shell and bash

Shell is an interactive command interpreter. Shell is independent of the operating system. This design allows you to flexibly choose the appropriate shell. Shell You can type a command in the command line,After being explained by shell, it is

Shell metacharacters and shell internal variables

Shell metacharacters and shell internal variables Shell metacharacters > Prog> file redirects the standard output to the file> Prog> file: attaches the standard output to the file.| P1 | P2 uses the P1 standard output as the P2 standard

Send broadcast notifications through ADB shell AM broadcast in the command line

Reprinted: http://blog.csdn.net/zuolongsnail/article/details/8167501 Run ADB shell AM broadcast on the command line to send broadcast notifications. Parameters following ADB shell AM broadcast include: [-A ][-D ][-T ][-C [-C ]...][-E | -- es ...

Chapter 5 Study Notes of Linux Command Line and shell script Programming

Chapter 2: more structured commands ForBasic Format for var in listdo commandsdone You can specify the list in the following ways:1. List for var in A B C D If the listed strings contain special characters, such as single quotes1) Use escape

Differences between for and while in Shell

Find out the difference between for and while, and write out the memo. Script: File =/home/hadoop/phrases.txt for content in 'cat $ {file} 'Do phrase = 'echo $ {content}' echo $ phrasedone The phrases.txt file contains the following content:

Use the Shell find command in detail.

 FindSearch for files or directories. Syntax: Find [directory...] [-Amin ] [-anewer ] [-atime ] [-Cmin ] [-cnewer ] [-ctime ] [-daystart] [-depyh] [-empty] [-exec ] [-false] [-FLS ] [-follow] [-fprint ] [-fprint0 ] [-fprintf ] [-fstype ] [-gid ]

Shell eval usage

1. Eval command-line Command-new Roman; "> line is a common command line typed on the terminal.HoweverEvalThe result is shell.Scan it twice before executing the command line.For example: New Roman; "> pipe =" |" New Roman; "> eval ls $ pipe WC-l New

Introduction to shell programming in Linux (3)

Iv. Loop Structure statements Common shell loop statements include for loop, while loop, and until loop. ForLoop Syntax: for variable in list Do Operation Done Note: The variable is used inside the loop to refer to the object in the List currently

Vmstat & Linux Shell memory monitoring

1. view the current system memory usage (free ): The free command has the following common options: -B displays data in bytes. -K displays data in kilobytes (Kb) (default value ). -M displays data in MB. -S delay this option will enable

Run shell scripts in Java

By using the runtime.exe cute method, we can run the Linux Shell script in a Java program or execute other programs. Referring to this article on the Internet: http://lee79.javaeye.com/blog/418549 (thanks), I rearranged the code.The

Shell brute-force single-step analysis (5) cracking tutorial

[Cracked by] layper[Author mailbox] layper2002@yahoo.com.cn[Author's homepage] www.sy135.com[Tools] peid, OD,[Cracking platform] Win9x/NT/2000/XP[Software name] single-step Analysis of Shell and shell chaos (5)[Statement of cracking] I am a cainiao.

Linux Shell 1>/dev/null 2> & 1 meaning

Shell may often see: Echo log>/dev/null 2> & 1 Command results can be defined in the form of %>/Dev/null: Indicates an empty device file.>: Indicates the redirection location, for example, Echo "123">/home/123.txt1: Indicates stdout standard output.

Shell string inclusion

# Method 1-- Character comparison #!/bin/bashstr1="hello"str2="he"str3="lo"if [ ${str1:0:2} = $str2 ]; then echo "$str1 include $str2"fiif [ ${str1:2:4} = $str3 ]then echo "$str1 include $str3"else echo "$str1 not include $str3"fi Running

Number of lines in the shell string

1. query the row number of the string. Grep-n "XXX" str.txt #-N print the prefix of the number of lines where the character "XXX" is located in the file "stringstr.txt" Example: Str.txt XxxYyyZzzXxx Enter the SEARCH Command: grep-n "XXX"

Use other users to execute scripts in shell scripts

2. In some software installation processes, you need to create an independent user and then run some installation operations such as gitolite installation, create a git user and execute the installation. Method 1:sudo -u user ... Sudo-u Git-H

Linux Shell script

1. Linux script compiling Basics1.1 Basic syntax IntroductionStart with 1.1.1The program must start with the following line (must begin with the first line of the file ):#! /Bin/shSymbol #! The parameter used to tell the system that the program is

Install and use a peanut shell (Linux)

Install and use a peanut shell (Linux). I did this: First you have to have a peanut shell account, must apply to the http://www.oray.com. Follow these steps. 1. Open the Web http://www.oray.com/peanuthull/download_linux.php In the XP BrowserButton

Detailed explanation of grep COMMANDS IN SHELL

Use 'grep' to search for text files If you want to find a string in several text files, you can use the 'grep' command. 'Grep' searches for the specified string in the text. For example, if you are searching for a file with the string 'Magic 'in the'

ADB shell dumpsys command to view memory

The memory of the android program is divided into two parts: Native and Dalvik. Dalvik is the Java heap we usually call. The objects we create are allocated here, bitmap is directly allocated on native. The memory limit is that native + Dalvik

Shell numeric and string comparison

Comparison of strings and values in Shell Binary comparison operator, which compares variables or numbers. Note the difference between numbers and strings. Integer comparison -EQ equals to, for example, if ["$ A"-EQ "$ B"]-Ne is not equal to, for

Total Pages: 541 1 .... 336 337 338 339 340 .... 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.