$ () and ' (anti-quote)In the bash shell, $ () and "(anti-quote) are used for command substitution.$ echo the last Sunday was $ (date-d "last Sunday" +%y-%m-%d)Get the date of the previous SundayThe reason for using $ ()1. "Easy to mix with" (single
Frozen pottery mu Fpniy advised surname Xin http://weibo.com/u/6195707793Cang Chen Rao y2b0i apricot Jia Unitary http://www.docin.com/app/user/userinfo?userid=180238445Rabar 579QH http://tushu.docin.com/srfm596The i5szn of white Eclipse and the http:
The difference between $ (()) in the shell and $ () and ${}Http://blog.chinaunix.net/uid-14351756-id-2820651.html$ () and ' (back quotes) in the bash shell, $ () and "(anti-quote) are used to do command substitution.The so-called command
Before participating in the CTF competition when the temporary write, there are a lot of shortcomings, but can be used, put it out to share to everyone, hope to help everyone.Script one: Record the current directory situation#!/bin/bashfunction
1. Reasons:My own ESXi server recently added a lot of virtual hosts, but I'm not installing, using, the kind of batch OPS (Saltstack,ansible,puppet, etc.). Although there is another way: to open several windows at a time through the shell tool, and
Shell Loop: ForThe number of cycles is fixed=====================Shell:For variable name [in value list]DoLoop bodyDoneC Language:for (initial value; condition; step))DoLoop bodyDone=====================Shell loop: While untilThe number of cycles is
I. Brief INTRODUCTION 1. What is a shellThe shell is a program written in C that is a bridge for users to use Linux.The shell is a command language and a programming language.The shell can also refer to an application that provides an interface that
Http://blog.chinaunix.net/uid-14351756-id-2820651.html$ () and ' (anti-quote)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
There are some files and folders under the current folder, and there are several. txt files in each folder.Now requires a new folder to be created in the current folder all, and those folders all. txt filesare copied to the folder all. The shell
by Francis_hao Jul 5,2017Getopts is a built-in command for the shell.OverviewGetopts optstringname [args]Optind,optarg,opterrDescribeGetopts is used by the shell program to analyze positional parameters,optstring contains the option characters that
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
6.1Given a user, determine if its UID and GID are the same "^ $USERNAME \>" (first word at the beginning of the line)If it does, the user is displayed as "good guy";#!/bin/bash#USERNAME =user1If!grep "^ $USERNAME \>"/etc/passwd &>/dev/null;then user
The following instance is used in the Centos6.5 64-bit operating systemOne, the regular copy fileA. Create the tomcatback.sh file in the/usr/local/wfjb_web_back directoryFile contents:#将tomcat中的应用wfjb_web copied to the/usr/local/wfjb_web_back/tomcat_
Shell script automatically adds black malicious attack IPSystem environment: Centos 6.5 X64If we open the SSH 22 port to all the users, then we can see in the/var/log/secure file, where the face is full of malicious attacks of IP, then how can we
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}
Arrays ArrayVariables: Storing the memory space of a single elementArray: A contiguous memory space that stores multiple elements, which is equivalent to a collection of multiple variables that support sparse formatting, which is a discontinuous
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.