The format is as follows:
# Echo-e '\ 033 [background color; foreground color; action control M string \ 033 [# m'# Echo-e '\ e [background color; foreground color; action control M string \ e [# m'
# Foreground | Background: Color#----------------
1. String Truncation
(1) intercept the string before and after a specified character
[Root @ gd86 applications] # Var = Hello: zkl: zyh
[Root @ gd86 applications] # echo $ {var %: *} returns the first string from right to left.Hello: zkl[Root @
Why can't I use the ifconfig command in RedHat Linux 5? After I have installed RedHat Linux 5, I use some commands on the terminal, for example, ifcinfig, to view the IP address of the local machine, the system prompts "command not found". What
Recently, the customer has been engaged in projects. The customer is eager to see the results. The boss always forgets to buy a domain name. There is no way to register a free domain name through the peanut shell for configuration. Because the
The current user configuration information in the registry is as follows:-----------------------------------------------------------------------------Windows Registry Editor Version
We have completed the first three steps. We will analyze the implementation of the entire shell script again:
Implementation Process Analysis:
1. Partition: Format and partition the selected disk.
2. Attach the disks in user-defined partitions to
1. VI Editor Shortcut Key memo[CTRL] + [UD] Move up/down half pageN shifted to n characters
H/m/l move to the top/center/bottom line of the screenU [CTRL] + R restore and redo. (Point) Repeat the previous action: E! Restore a file
When the script needs to interact with the person running the script.
BASH Shell provides command line parameters (data values added after the command), command line options (single character values for modifying Command Behavior), and direct
Chapter 4 directory operations
4.3.1 column directory
$ Ls directory
-D option, force to display only the directory name, not the content
4.4 operation directory
4.4.1 create a directory
Mkdir directory
Example: $ mkdir hw1
Create the hw1
Common RPM parameters for these tasks !!! In Linux, you can run man rpm !!! It's only in English, or you can get Baidu RPM !!! I 'd like to paste a few below !!!! Common RPM commands 1. install a package # rpm-IVH 2. upgrade a package # rpm-uvh 3.
The TR command reads data from the standard input device and returns the data to the standard output device after string translation.
Cat filename | tr u n: used to replace the U in the filename file with N on the screen, but not in the actual
In shell, you can use export to modify the environment variables of the current process. For example,Export Path =.: $ pathYou can add the current path to the executable file search path, so that you do not need to press "./excutable" to execute the
It is often necessary to call other scripts (shell, CMD) in Java, which were used previously:
Runtime r = runtime. getsystemruntime (); r.exe C ("whatever you want to run ");
However, sometimes the running results are unpredictable, causing a lot
System: Ubuntu 9.04
"After logging in, type CHSH and press to change the default shell. Depending on the system, you may be asked to enter your login password and the name of the shell to be used. Enter the complete path of the shell to be used.
1. How to use echo to output a string STR = "-n". Because-N is a parameter of ECHO, the General echo "$ Str" method cannot be output.The solution can be:Echo x $ STR | SED's/^ x //'Echo-ne "$ STR \ n"Echo-e "$ STR \ n \ c"Printf"% S \ n" $ STR (this
Basic Unix shell script Test1. Which of the following code lines will print your previous working directory to the screen? CA. Echo ~B. Echo $ pwdC. Echo ~ -D. Echo *2. Which of the following symbols can be used to redirect the command output to a
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.