Linux-------The creation of Shell programs and special characters

first, how to execute the shell scriptShell scripts are text files, so you can create and edit scripts with any text file editor (such as Vi,emacs, etc.). The name of the shell script file does not have a qualified suffix name, usually without a

Shell script Case--Gets the date of the day before the current date

Record a shell script case that includes some syntax for the shell (function definition, expression operation, if, case ...). )#!/bin/sh#获取当前时间run_time= ' Date +%h%m%s '#取当前日期前一天Get_ydate (){#设置当前年月日today= ' Date +%y%m%d 'Month= ' Date +%m 'day= '

Shell-related knowledge

In the bash Shell , $ () and "(anti-quote) are used for command substitution.The so-called command substitution is similar to the variable substitution we learned in the fifth chapter, which is used to reorganize the command line:* Complete the

Fundamentals of shell Programming for Linux

One, variableVariables in the shell are divided into: local variables, environment variables, positional parameters;Local variables: Variables that can only be used in scripts for the user's current shell lifetime, local variables are invalidated as

"Linux Shell Script Raiders" note chapter I: Shell starting base

Linux Shell Script Raiders notesChapter One: Shell start -up basics1. Variables: In bash, the value of each variable is a string. Whenever you assign a value to a variable, there is no quotation mark, and the value is stored as a string. 2,

Not fine, and the shell's pipe to the pit.

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

Shell command real-combat detailed

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

Bash shell vulnerabilities and testing

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

Frequently used shell commands (updated in succession)

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)

Shell learning process 1-How to output A-Z; spaces, line-wrapping conversions

There are a bunch of host addresses:A.baidu.com...Z.baidu.comHow to extract the. Baidu.com letters from these data, such as: a b...z?When you see the problem, you first think about how to generate the file with a script:Ideas:1. Definition suffix:

The shell script reads multiple files line by row and corresponds

#!/bin/bashFor i in ' seq 448 'DoAaa= ' Sed-n "$i" P num.txt 'Bbb= ' Sed-n "$i" P text.txt '/root/cooper/sms.pl $aaa $BBBDoneNum.txt recorded 348 numbers.348 fields are recorded in the Text.txtThe effect is to take the first row in the Num.txt as

First blog with the first shell script written

Work fast two years, to Cnblogs also nearly two years, high-touch, but also at least into the program Ape Army.Finally opened the blog (do not laugh, belly ink is too little, are looking at the study of the Great God).I don't know what to

Shell Basics-2

~ 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

Get External variable contents in shell while

First, the questionThe question is simple, look at the following section of tmp.sh code:#!/bin/Shx= "This was theinitial value of x" while a read line; Do x= "$line" = $x/tmp/tmp's Content1,aExecute./tmp.sh, the normal x variable is

Shell:bash date before and after day based on a specified date

Tag: Date ####################################################################### Copyright C # # All rights Reserved # # Name : yestoday.sh# Author:canux [email protected] # # version:v1.0 # time:wed (04:37:37 PM cst# Description : ################

Shell-find Error parsing

Previously wrote an article, with Shell timed purge expired files "Shell timed purge expired files", its practical is simple find commandAfter the colleague adopted, he debug the script, there are a few errors, I did the collation:1.find:paths must

Sch encrypts shell scripts 02, schshell

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

Linux Command -- bash shell configuration, linuxbash

Linux Command -- bash shell configuration, linuxbash I. shell Type From the perspective of user login, shell types include: 1. logon shell: (read environment configuration) Normally log on through a terminal: Su-USERNAME Su-l USERNAME 2. Non-Logon

Linux shell programming: simple shell and windows file conversion,

Linux shell programming: simple shell and windows file conversion, What is shell? Ls displays a bunch of directories? What is the execution process? Ls is an application. shell transfers the code 01 to the kernel and the kernel to the hardware.

Shell-find error Parsing

Shell-find error Parsing I have written an article about how to use shell to regularly clear expired files. In fact, the simple find command is used. After my colleague adopted the script, he encountered several errors when debugging the script. I

Total Pages: 541 1 .... 390 391 392 393 394 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.