Transfer
1. location parametersThe parameters provided by the system are called location parameters. The value of the location parameter can be obtained using $ N. N is a number. If it is 1, it is $1. It is similar to the number in C language.In
I work in windows and use securecrt to connect to a remote Linux host.
I downloaded a zip file from the Internet (all files are PDF and DOC files, which need to be viewed under Win) and decompressed it with RAR in windows. Use the RZ command to
Windows powershell cmdlet
The cmdlet (read as "command-Let") is a single function command used to operate objects in Windows powershell. The name format can be used to identify the verbs and nouns separated by hyphens (-), such as get-help,
Okay. Run this script and you will understand it.#! /Bin/bash
Until
[
$
#-EQ 0]
Do
Echo
"$ @"
Shift
Done
See the role. When shift (without parameters) is run each time, a parameter is destroyed and the subsequent parameter is moved forward.
Q: How can I change the shell display mode to [complete working directory of username @ host] $ to [last working directory of username @ host] $
Solution: Add export PS1 = '[/u @/h/W]/$' to. bashrc'
Note:
In Linux, there are two variables for the
Echo-e "/033 [32; 49; 1 m [done]/033 [39; 49; 0 m"Output result: [done]###########################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
1 shell $! , $ ?, $, $ @
• $ N $1 the first parameter, $2 the second...• $ # The number of command-line parameters.• $0 the name of current program.• $? Last Command or function's return value.• $ The program's PID.• $! Last program's PID.• $ @
Power shell provides the definition function for user variables.
Variables do not need to be declared first (of course, they are in uniformity. For some global variables, we recommend that you declare them first and assign values). The variable
How do you build the system environment when you get a brand new computer? Do I manually create a user group and manually configure permissions for each service? At least, you should learn how to write the next batch of processing commands. You will
Shortcut Operators
If you are familiar with the C language, you may like the following expressions:
[-F "/etc/shadow"] & echo "This computer uses shadow passwors"
Here & is a shortcut operator. If the expression on the left is true, execute the
Use a Pseudo Terminal to interact with Shell in Linux
-- Lihn1987
Gdb is always used for program debugging in the company recently. As the debugging level increases, the omnipotent printf becomes increasingly useless. If you can't do it, you will
This article is the fourth chapter of Learning the bash Shell 3rd Edition, Basic Shell Programming, but we will not limit it to this.
Run the shell script program
A script containing shell commands is a shell program, such as. bash_profile. We can
Chapter 3 shell Input and Output3.1.1 echoThe echo command can display text lines or variables, or input strings to files.Echo [Option] string--E parse escape characters--N: Do not use line breaks. By default, line breaks are used in Linux.-Escape
Rename
Rename ABC abc0 * ABC *
Replaces the first ABC in the file matching * ABC * in the current folder with abc0.
The second variable name. The second access count variable reads $0 $1 $2 and so on.
1 #! /Bin/bash2 3 typeset param_num =$ #4
Environment:
Wince5.0 + ARM926
Purpose:
Create Shell in your own style
Background:
Considering the consistency of the appearance and style of the product, you cannot directly use Explorer as a Shell, and you do not have to simply put Explorer
Li Sanhu, the second International Class 2 of the 2010 International Software Institute of Wuhan University, hasn't written any logs for a long time. Today, I wrote one.
I recently feel that the book is still very classic for learning a new language.
Redirection
File Code: 0, 1, 2 ,... output
Most of the conversion semantics cannot be used independently and must be used together with the Bash command.
Operation file:
Fd <> FileFd file code, available for reading and writing
Fd Close input
Function
Bash does not enable a new sub-shell to call a function. It is executed in the existing shell environment.
Syntax:
Function Name (){Command Area}Function Name (){Command Area}Function Name{Command Area}
Call: function name parameter 1
I. Shell VariablesIt mainly includes local variables and environment variables.
1. Local variable -- Used in the script currently running by the user1)Define local variablesFormat: variable-name = valueExample: [root @ jike1/root] # LOCALTEST =
Explain in detail some of the most basic functions, struct, and enumeration in Shell programming.
Shgetasktopfolder Get the IShellFolder interface of the desktop
Code highlighting produced by Actipro CodeHighlighter
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