Shell programming (chapter 1 of courseware)

============= Shell parameter passing ======================================P2[Soflib @ localhost ~] $ Cat ARGsEcho $ # arguments passedEcho Arg 1 =: $1, Arg 2 =: $2, Arg 3 =: $3[Soflib @ localhost ~] $./Args A B C3 arguments passedArg 1 =: A, Arg 2

Solve the Problem of garbled Chinese input in the shell environment (GIT-bash) of msysgit

InWindowsThe defaultMsysgitOfShellEnvironment (that isGitBash).ShellEnter Chinese characters in the interface and do some processing. 1 Methods of online circulation Modify configuration file\ Git \ etc \ inputrc, Add or modify the configuration

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,

What is the difference between "in shell?

1. Difference between single quotes and double quotes Single quotation marks: A single quotation mark can only contain general characters without special characters. Double quotation marks include special characters. Example: # Name = vbird #

Use shell commands to stop or run the service-Service

Use shell commands to stop or run services --- Service # Service xinetd stop // stop running the xinetd service Stopping xinetd: # Service xinetd start // start the xinetd service Tip: sometimes when we use Linux for Internet access, we cannot

Parentheses in shell programming

Parentheses are used to run a group of commands, The command enclosed by () indicates to run in the sub-shell without affecting the current shell environment.The command enclosed by {} indicates that the command is run in the current shell, and

Several groups of Shell-written progress bar programs

1. Add the $ symbol:#! /Bin/shEcho | awk '{printf "^) ^", $1 }'While sleep 1DoEcho "$" | awk '{printf "% s", $1 }'Done   2 changed sticks:#! /Bin/bash I = 0While [$ I-lt 10]DoFor J in '-''//'' | ''/'DoEcho-ne "/033 [1D $ J"Usleep 50000Done(I ++

Shell script learning-4 (* assignment result)

Let's take a look at the asterisk assignment:   [Rocrocket @ rocrocket ~] $ Myvar = * [Rocrocket @ rocrocket ~] $ Echo $ myvarApache-tomcat-5.5.26.tar.gz audiodump.wav desktop documents download dwhelper educonn.tar.gz music pictures public

Basic knowledge of shell scripts 3-more structured commands

For, while,1. For command ForVaRInList Do Commands Done Provide a series of values for iteration In the parameter list.(1) read values from the list VaR is used to obtain the value in the list in this loop. In addition, the variable VAR

Shell-shell example

From: http://www.csdn.net/article/2013-08-15/2816581-What-I-learned-from-other-s-shell-scripts The author Fizer Khan is a shell script fan who is so obsessed with novel and interesting things about shell scripts. He recently encountered an authy-ssh

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

Shell programming in Linux

Prerequisites: The shell environment pdksh and Bash; the default shell environment in Ubuntu is Bash.   Syntax: Variables 1. There are three types of variables: environment variables, internal variables, and user variables. The environment

Windows Power Shell

Http://baike.baidu.com/view/2838635.htm? Fromid = 58531 Windows Power shell ask for help editing encyclopedia business cards Windows Power Shell Windows powershell is a command line shell program and script environment that allows command line

Shell memo for querying user information in Linux

Author:North SouthSponsorship:From:Linuxsir. orgAbstract:This document describes several tools used in user management, including ID, finger, groups, W, WHO, and users; Directory Index 1. Principles of user query tools; 2. user and group query

Shell script learning-2

1. Use shell programming to determine whether a file is a block or character device file. If it is copied to the/dev directory. #! /Bin/bash# 1.sh# Determine whether a file is a character or a block device file. If it is copied to the/dev directory#

Shell script learning-5 (SED command learning)

1 Have you ever wondered why SED is called sed? Sed is short for stream editor. Sed is a stream editor. To put it bluntly, we enter a string of information into SED, which is processed and output. That's simple. Similar to cut, sed is a row-oriented

Shell script learning-6 (SED command learning)

5 is there an option in sed? Is there anything that is commonly used? Sed's most important part is the command part. If you have played this part, you are already very good. The premise of playing this part is to play with the regular expression.

General shelling steps and example of encrypted Shell

Today, I am mainly going to have a deep understanding of the assembly language. If I want to decompile the language, this is not enough. Of course, this is not a day or two that can be successful. Continue to work hard.   I. How to distinguish the

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

ADB shell dumpsys

Http://blog.csdn.net/wike163/article/details/7289586 Android has an interesting command calledDumpsysTo dump some system information. Even described on ADB manual IThink that some points shocould be reinforced. In order to get the complete status

Total Pages: 541 1 .... 418 419 420 421 422 .... 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.