1. Understanding Shell
As long as the interface that can manipulate the application can be called Shell. The shell is also an application that works in user mode and runs as a process. The shell process is primarily used to provide a command-line
This article mainly introduces the "shell judge string is a number", mainly related to the shell to determine whether the string is a number of content, for the shell to determine whether the number of figures interested students can refer to.
?
Enun Remote Cmdshell, like to play Cmdshell friends can refer to the next
Effect as shown:
Copy Code code as follows:
'============================' Enun Remote Cmdshell v 1.0'============================
Option Explicit
CONST
1. "" "" "The Difference," "The variables will be resolved" "All of them as strings" "to execute system commands
2. The custom variable defaults to a local variable, and the environment variable is a global variable.
3.export can set one or more
1.Linux users are divided into ordinary user accounts and Superuser user accounts.
The 2.Linux group accounts are divided into private groups and standard groups. When you create a new user, but do not specify the group to which he belongs,
Syntax format for if structureSingle branch structureIf then Directives fiif ; Then command fiDual-branch structureIf ; Then instruction 1else instruction 2fiMulti-branch structureIf ; Then instruction 1elif instruction 2elif instruction
Like other languages, the Shell can also contain external scripts. This makes it easy to encapsulate some common code as a standalone file.The Shell file contains the following syntax format:. FileName # Note number (.) With a space in the middle of
File judgment operator–b return True when file exists and is a block file-C Returns True when file exists and is a character-D returns True when pathname exists and is a directory-E Returns True when a file or directory specified by pathname is
1 . Deletion and substitution of variable contents# The representation is deleted from the front, so here it starts / deletes ,* instead of 0 to infinitely more than any character% Delete variable contents from behindFor example:echo ${path%:* bin}
1. Command history:Environment variables:Histfile: Number of records in the command historyHistsize:~/.bash.historyHistfilesize: The number of history records in a command history fileHistory: Default display of 10 recordsHistory-n: Show post n
In the shell, send a signal to the process a lot through the CTRL key plus some function keys to achieve, here is the common CTRL key combination and its meaning:
Key combinations
Signal type
Significance
CTRL +
IfconfigThis command is consistent with the "ipconfig" function of windows for displaying details such as network interfaces, subnet masks, and so on.Ifconfig the left column is the network interface name, which occupies 10 bytes, and several
Bash's built-in string processing tool:String slices:${var:offset:number}Takes a substring of a string;Take the rightmost few characters of the string: ${var:-length}Note: There must be a white space character after the colon;To take a substring
1.Follow"File Type"to Judge(presence or not)- e:does the "file" exist? exist as true(Common)-F:is the "file" aNormalfile(file)? (Common)- D:whether the "file" is a directoryfile(directory)? (Common)- b:whether the "file" is ablock device files
Objective: To monitor the operation of Nginx and NFS services in the cluster, such as any service exception, send an email to notify the userCondition: 1. Host and the IP address of the sub-machine, hostname has been determined;2. The host and the
One: Hello WorldCreate a new file, named after the. sh suffix. Each bash file begins with the first row of table names file type: #!/bin/bashThen enter the code below.For example, the output Hello World:#! /bin/"helloworld"Run Bash file:./file name.
# Abc=haha# echo $ABChaha# echo "$abc"haha# echo ' $abc '$abc# echo ' $abc 'haha# echo ' $abc ' $ABC 'Haha$abcFrom the above example, it is not difficult to see that the double quotation marks are not shielded from the variable and some special
Recently, there is a requirement in the project: when the foreign currency funds in the system are dispatched, a TXT file is generated and the TXT file is sent to another system (Kondor). Generated files naturally use Outputstreamwirter, send files
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