I've used the bash shell, and it's not a short time. But I've never learned to shell, at least not so seriously as C + +. Usually write some basic script no problem, do not understand can also Google, Baidu. On the last day of 2014, it fell into the
1, according to a specified section of the path, the data copy. = head Assembly.txt /ifs1/st_env/user/liyiyuan/liushanlin/1kite_1_2/110817_i809_fcd05cdacxx_l3_insbustbarabpei-119/e3/gap/e3.scafseq_200/ifs1/st_env/user/liyiyuan/liushanlin/1kite_1_2/11
The 1.bash shell is the default shell command interpreter for most Linux distributions, but a recent burst of bash shell has been exploited.2. If bash is the default system shell, network attackers can attack servers and other Unix and Linux devices
Strings are the most common and useful data types in shell programming (except numbers and strings, and no other type works well), strings can be in single quotes or double quotes, or without quotes. The difference between single and double quotes
Remember that once wrote the script by the days of the cycle, the real date can be any day, like this:1start_day=$ (Date-D"$TODAY -1days"+%y%m%d);2 3end_day=$ (Date-D"$TODAY-${cycle}days"+%y%m%d);4 5 for((; $END _dayDate-D"$END _day +1days"+%y%m%d )
Shell command:The shell recognizes three basic commands: Built-in commands, shell functions, and external commands:The built-in command is the command executed by the shell itself. Some orders are built on the basis of their necessity, for example:
It's just my personal use, not all of it.1. Get the return value in front of the pipelineEcho ${pipestatus[0]}e.g.[Email protected]:~# date1 | echo 22No command ' date1 ' found, did your Mean:command ' date ' from the package ' coreutils ' (main)
Today is too lazy, do not want a characteristic of a feature to statistics, and write a script#!/bin/bashdir_bas=$ (CD $ (dirname ${0});p wd) a= ' cat $dir _bas/feat ' feat_bas=$1total=0for B in $Ado echo $B Count= ' grep ' $B ' $feat _bas |
@1: Sub-string removal${string#substring}The shortest matching $substring is truncated from the beginning of the $string.${string# #substring}The longest matching $substring is truncated from the beginning of the $string.${string%substring}The
Recently in the study of shell programming, idle to do nothing, to engage in a small shell. can be used to detect the surviving host of a network segment.1#!/bin/Bash2 #3#Date: the/ A/ -4#blog: www.cnblogs.com/Outline5 #by: Joe6 7 if[$#-lt1] ; Then8
The full syntax format for the Find command is as follows:find [path] [options] [tests] [actions]
PathThe path section is easy to understand: You can use either an absolute path, such as/bin, or a relative path, such as. 。 You can also specify
~ Home directory. Equivalent to the $home variable.~+ the current working directory, equivalent to the $PWD variable.The working directory before ~-, equivalent to the $OLDPWD internal variable.=~ is used for regular expressions, this operation will
For the location variables in the Linux shell, I have always been unable to spit out and swallow, every time I see do not understand, do not understand the Baidu Google, read and forget, is really chronic pharyngitis ah. Now seriously think about it
This script my_name shows how the arguments to the function are passed, and how the function returns a value of TRUE or false. Use a parameter to invoke the script, which is the name you want to use in the problem. Shell script
Sch encrypts shell scripts 02, schshell
Sch encrypts shell scripts 02
I. Introduction
SHC (shell script compiler) is the shell script compiler. Scripts compiled through SHC are not readable for common users. Therefore, if you want your code to
Frequently used shell commands (updated in succession) and shell commands
It's just something that I often use, not comprehensive.
1. Obtain the returned values before the MPs queue.
Echo $ {PIPESTATUS [0]}
E.g.
root@node2:~# date1 | echo 22No
Shell programming-sort and shellsortThe sort sorting operation sorts a row in one or more files according to the set rules. Output to the standard output and will not be saved to any files.-T specifies the filed separator. The default value is space.
MacOSXRAMDisk (memory disk) Shell
This article provides the ghost version of Mac OS X RAM Disk (memory Disk) Creation Program and practical instructions.Concerns
When Mac thunder downloads, The IOPS is too high. It may be because the cache is not
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