Tag:shell function function definition: 1, no return value #function为关键字, function_name for Function name function function_name () {com Mand1 Command2 ...} Omit the keyword FUNCTION, the effect is the same as
Very few shell scripts, recently wrote a shell script, encountered some problems, unexpectedly was tossing for a long while. These errors are too low and should not be. While there is now time, the entire process of executing the shell script is
Menu.sh Menu Interface Script#!/bin/bash#menu. ShFunction menu () {Cat #############################################' Echo-e ' \033[32;40m menu \033[0m "'#############################################* 1) Add a user* 2) Set password for user* 3)
As a system administrator, it is often necessary to periodically clean up certain rules of the file, such as expired logs, expired archives, backed up files, and so on.If you use certain matching rules to find these files and then pass them to the
1. Running a program with parameters$ A indicates the name of the program, which represents the first argument, and the second argument, and so on, until the nineth parameter $9# VI Factorial#!/bin/shf=1for ((i=1;iTest:[Email protected]
Shell Programming:Bash Variable type:Environment variablesLocal variables (local variables) Positional variables Special variables (built-in)Local variables:Varname=value: Scopes are available for the entire bash process;
$$: The process ID representing the shell script
$!: The process ID representing the last executed shell script
$?: Represents the return value of the last executed shell command
$*: Represents all parameters in the form "parameter one
For more information, refer to:(iii) Play with Me Linux Network service: master server configuration for DHCP service configuration1#! /bin/Bash2ipsag="10.10.10"3dnsip="10.10.10.10"4dn="ns.gr.org"5Cat >/etc/dhcpd.conf 6ddns-update-style
A. Character test= =: Test for equality, equality is true, not equal to False! =: Test Whether it is unequal, not equal to true, etc as false>-N String: Tests whether the specified string is empty, empty is true, or false-Z String: Tests whether the
· CMD in the execution of the shell regardless of · What is the content of, advanced interpretation, and then the interpretation of the final results to the shell, if the result of interpretation is not the shell can command, will be error. However,
1, the variables in the shell can be customized, the shell uses the variable with the $Name= "Shero"echo "Hi ${name}"[Email protected]:/home/shero/shell#./test2.shHi SheroNote that there can be no spaces between the variable name and the equals sign,
Create a thread to refresh the current system timeNew Thread () {public void Run () {Here is another separate thread, not a UI threadDisplay Dis=shell.getdisplay ();while (true) {Non-UI thread access UIif (!shell.isdisposed ())//whether the current
The first few days of the project team out of the shell OJ questions to practice, the topic is about:The existing configuration file Conf.ini as follows, write the shell, enter title and key, output its value,If input FIFO1 a1, then output 11file
Shell programming notesShell programming:Bash variable type:Environment VariableLocal variable)Location variableSpecial variables (built-in)Local variable:Varname = value: applies to the entire bash process;Variable naming rules:1. It can only
Linux series-shell learning notes (Continued 1) process user input,-shell learning notes
1. Run the program with Parameters
$0 indicates the program name, $1 indicates the first parameter, $2 indicates the second parameter, and so on until the ninth
Here documentation in Shell,
We know thatlinuxCommand Line operations can all be placed in the file. After the executable permission is granted, the file can be changed toshellScript. But if we talk to some programsInteraction,shellScripts cannot
Shell programming tmpwatch, shelltmpwatch
As a system administrator, you often need to regularly clear files with certain rules, such as expired logs, expired archives, and backed up files.
If you use certain matching rules to find these files and
Shell programming oracle10g installation preparations before rhel6.4, oracle10grhel6.4
OS: rhel6.4
Oracle: 10.2.0.1
Because oracle10g has been released for a long time and many packages used for 10g have been updated to a new version, many strange
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