Below we will introduce you to 5 to protect your iphone's shell, they can be broken, broken and waterproof and so on.
1.OtterBox symmetry Series
Reason for recommendation: Don't take up the land in your pocket. This is a
There are many ways to intercept strings in the shell,
${expression} A total of 9 ways to use.${parameter:-word}${parameter:=word}${parameter:?word}${parameter:+word}4 of the above can be used to replace the default values.${#parameter}The above
The introduction to shell scripting is what this article is about, and we can use any type of text editor, such as Gedit, Kedit, Emacs, VI, to write the shell script, which must begin with the following line (must be placed on the first line of the
The AR command can be used to create, modify, or present a single module from a library. A library is a separate file that contains other files that are organized according to a particular structure (referred to as member of this library file). The
To compare two strings for equality:
If ["$test" x = "Test" x]; Then
Here are a few key points:
1 using a single equal sign
2 Notice that there is a space on each side of the equal sign: This is what the Unix shell requires
3 Notice the last X of "$
Get the number of rows in a single file
File: test1.sh
Number of rows: 20
Method One
Copy Code code as follows:
awk ' {print NR} ' test1.sh|tail-n1
As shown in the figure:
Method Two
Copy Code code as follows:
Copy Code code as follows:
#!bin/sh
# Find the file for the specified suffix at the specified location, including subdirectories
Usage
# FINDF $ $
# The first parameter is a suffix
# Find the file for the specified suffix and print it out
Copy Code code as follows:
#!/bin/sh
Mypath= "/var/log/httpd/"
Myfile= "/var/log/httpd/access.log"
#这里的-x parameter to determine whether $mypath exists and has executable permissions
if [!-X "$myPath"]; Then
mkdir "$myPath"
A few examples of shell scripts, it feels good.
"Example: 001" to judge the input as a number, character or other
Copy Code code as follows:
#!/bin/bash
Read-p "Enter a number or string here:" Input
Case $input in
[0-9])
First, Introduction
Environment variables are typically used to store path lists that are used to search for executables, library files, and so on. For example: $PATH, $LD _library_path, they usually look like this:
Copy Code code as follows:
Write this blog before, I Google a bunch of related articles, mostly said to modify/etc/sudoers, and then nopasswd: designated CMD, but really no use, no remote virtual terminal This method is cloud, ubuntu10.04 Server Pro-Test!!
Remote operation
1. Understanding Bash
Through the shell will input the instructions and kernel communication, let kernel control hardware workView Shell:cat/etc/shellA preset shell type is recorded in the/etc/passwd after login and is related to the accountCommand
INI file format is generally composed of sections, keys, values of three parts
Format:
[Section I.]First key = valueSecond key = second value[Section II]First key = Val1,val2,val3Example:
Copy Code code as follows:
[COM]
Kinggoo =
It's fun for the terminal print in the shell!First know that the end of the shell print has echo printf is commonly used is echo slightly;
Note: Font Color reset = 0, black = 30, red = 31, green = 32, ***=33, blue = 34, magenta =35, cyan = 36,
Save a script file under Windows, upload to CentOS with SSH, add permission to execute Nginx prompt without that file or directory.The shell script is placed in the/etc/init.d/directory, and then executes the/etc/init.d/nginx, prompting more of this
Empty shell Mail 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0057.gif "alt=" J_0057.gif "/>1. Meaning of introducing empty shell messagesMail server directly exposed in the network environment, Security will be greatly reduced, so the
Example 1,Cut nginx logs by date and automatically delete logs generated seven days ago (logs have been synchronized to dedicated log storage servers, so you can safely delete historical logs .)#! /Bin/bash# InitializationLOGS_PATH =/data/nginx/logs/
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