Prerequisites
Check script Syntax: Bash-V test. Sh Jack
Do not run. view onlyCode: Bash-n test. Sh
Trace execution: Bash-X test. Sh
Force variables to be declared first and then use: shopt-S-O nounset
When executing the script with SH test. Sh,
Doscommand shell command bat command to execute Java class files and jar files
1. run Java without a package name
ProgramCompile it into helloworld. Class and run it in the directory where the class is located:
Java helloworld
2. Run a
#! /Bin/bashwhile [1] Do A =$ (ifconfig eth0 | grep 'rx PAC '| awk' {print $2} '| awk-F: '{print $ NF}') echo-ne "$ A \ r" # refresh data done without line breaks
EchoParameter number:-N. Do not wrap the line at the end.-E if the following
For example, the following is an address book written in a Linux Shell script. The "add, delete, and query" function has been implemented. The "change" function is complex and is to be continued ~~
1 #!/dev/bash 2 3 # Name of address book 4
All Unix users should understand how to use the Korn shell script. By writing shell scripts, You can automate many tasks and save a lot of time. It seems daunting at first glance, but you can use it skillfully as long as you follow the correct
Bash cannot handle floating-point operations and lacks specific operations. These operations are important computing functions. Fortunately,BCThis problem can be solved.BCNot only is it a flexible and precise tool with multiple functions, but it
Shell Insert sortingBasic Thinking of hill sorting
Basic Idea:
Take an integer D1 smaller than N as the first increment, and divide all records of the file into D1 groups. All records whose distance is a multiple of DL are placed in the same group.
I have been busy with projects recently and encountered a very tangled problem in the process. Other shell scripts can be called only after the shell script training database is executed. Here we will summarize and share it with you.
The script is
1. Introduction
Hbase is a distributed, column-oriented open-source database. It originated from Google's paper bigtable: a distributed storage system for structured data. Hbase is an open-source implementation of Google bigtable. It uses hadoop
Object pipeline is a convenient feature of PS. One of the main advantages of using an object is that it enables the use of pipeline transmission commands (that is, it is much easier to pass the output of a command as input to another command.
Functions in shell are similar to methods in Java. script code is placed in the function and can be run anywhere to reduce a large amount of repeated code.
Understanding Shell functions involves the following aspects: function creation, function
A problem occurs in the system. When the VBS script runs, the WScripting. Shell cannot be created.
In fact, some objects created by calling the CreatObject function in VBS are some COM objects stored in DLL files. An error is reported when the DLL
Shell Command learning notes
1. tr replacement characters
Simple Example: tr 'A' a'
Replace A with. The tr command can only be used to replace a single character. If it is written:
Tr 'abc'
It means to replace the characters A, B, and C with the
File Operations
Get directory content
Ls
Getconf ARG_MAX
Determine whether a file exists
Create a file
Create a general file:
Create a file
1 use the redirection output:> text.txt
2. Use the NULL command:> test. xtx to increase script portability.
ShellIntroductionBashProgramming execution
There are five methods to execute a command in the Bourne Shell, and the results of these five methods are different:: Run the following command directly: This method is the same as using the command in
Linux ShellStrong Regular ExpressionsGrep
Linux grep commandUse 'grep' to search for text filesIf 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.Suppose you are
What isShell
Shell is a program with special functions. It is an interface between the user and the core program (kernel) of the UNIX/Linux operating system. Why do we say shell is an intermediary between the core program of the system and the user?
In oracle, you can use the dbms_job package to regularly execute pl/SQL and SQL processes. crontab can only be used for scheduled tasks at the operating system level, such as backup.
This article describes the specific usage of crontab for memo.
In
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