* Wildcard characters? Compared with *, to match a# comment out, do not take effect\ de-signifier symboltouch \ #1. txtls \ #1. txt| A pipe character throws the result of a command to the next command$ variable prefix (when you get, use the variable,
In some scenarios where security requirements are high. SSH timeout is pre-set by the administrator, after idle for a period of time SSH connection will be actively disconnected.This scenario assumes that the script runs through SSH and the script
[[email protected] ~]# mkdir shell[[email protected] ~]# cd shell/[[ email protected] shell]# vim first.sh#!/bin/bash must be # #the first test shell script. Description # #written by guozhen.mkdir 123
When you create a child process with fork (), you execute the same program as the parent process (but it is possible to execute a different code branch), and the child process often calls one of the exec functions to execute another program.Process
FileZilla Unable to determine the target of the drag-and-drop operation because the shell is not properly installed __ workaroundAfter reloading the system and related software, using FileZilla to drag and drop files on the FTP file to the desktop,
Some knowledge of variables in the shell:Variable:1. By default, all variables are considered to be stored as strings.2. Variable case sensitivity3. Add $ to the variable name before accessing the content4. No declaration required5. The $ extension
The structural characteristics of the all-back text are as follows:Assuming that the number of characters is even, it is structurally represented as a sequence of characters with the same character but with the opposite sequence of
1. Use the editor to write a file, which is the command entered in the shell, can be used through the PATH environment variable reference to the command.#! /bin/sh #! The following parameter is the program used to execute the script#后面是注释The rest is
* Wildcard character (* for 0 or more arbitrary characters)[[email protected] ~]# ls *.txtA.txt1. txt:2. txt:? Represents only one arbitrary character[email protected] ~]# Touch Testa[[email protected] ~]# touch Testb.txt[[email protected] ~]# ls-d
1. View the native supported shell types, cat/etc/shells. /bin/bash is the default shell for Linux2.bash Shell function Command memory function history (file address ~/.bash_history) tab command complement function alias command aliases set function
In the shell to find, grep is doomed to escape.Cat file grep Austinis to look in the document for the row where Austin is located.After grep matches the regular expression, the Find function becomes exceptionally powerful.At this point, it's good to
Shell echo Command echo"It is a test"The double quotes here are completely omitted.3The . Display variable read command reads a line from the standard input and assigns the value of each field in the input row to the shell variable #!/bin/SH read
#! /bin/bashpid=$ (pgrep Hello) echo ${pid}The script name is hello_test.shAlways returns two values when a hello process existsWhen the hello process does not exist, the return value is not empty, always returns a value, runs multiple times, and
Shell Test CommandThe test command in the shell is used to check if a condition is true, and it can be tested in three aspects of numeric, character, and file.
Numerical test
Parameters
Description
-eq
By using Word count to perform the process in Spark-shell, we want to see what Spark-shell did? The following script is in the Spark-shell, see Code Listing 1-1.Code Listing 1-1 Spark-shell
1234567891011
functionmain() { if$cygwin;
Eight, shell script sed&awk01.sed using the Flow editor-steam editor#ed/etc/passwd1,10p ... 1s/root/byf/p (replace root for BYF) #sed-E ' s/root/byf/g '/etc/passwd (function as above) just show the content change #sed-e ' s/root/byf/g '/etc/passwd >/
Come to a domain name how to determine its cache or not, the high-level professional crawler can certainly do analysis, if not very rigorous analysis, through the shell script can also be implemented, to see me this layer of pages of small crawl bar,
Let's summarize the problem of recursive loops in the Linux shell today.Cause is a group of friends in the group of questionsQuestion of how to move a few files with more or less empty directories.In the final analysis, it's a recursive loop problem.
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.