One, automatically padded: [Tab]
A lot of people should be able to do this by pressing the [TAB] key when entering commands, directories, or filenames. The system will help you fill in what you might want to enter, if more than one selection system
For Linux array definitions, and build methods, see: Linux shell dynamically generate array series SEQ usage tips. My main point here is to efficiently generate the list string, as well as the array method.
One, the SEQ method produces:
If you're not familiar with the Linux shell array, see an article: The Linux shell array build and use techniques, this article is mainly about dynamically generating array series. There should be a lot of methods here, I mainly take a sum
Using the Rename command
========================
NAME
Rename-rename files
Synopsis
Rename from to File ...
========================
Copy Code code as follows:
#! /bin/sh
Inifile= "./dirlist.ini"
curpath=$ (PWD)
For Serverpath in $
First, add suffix
1. Problem: The same directory has a large amount of date-named files, some of which have suffixes, some end with the point, such as 20020101.,20020102.,......,20020101.td,20020102.td ...Requirements: Add all the suffix to the end
There are shutdown, halt, reboot, Init for Linux down and restart systems, and their internal processes are different for them.
Another year, into 2010 years, in the last year maybe Microsoft grabbed the halo of Linux, but for the development of
Because the Linux production environment to build a lot of steps, it is cumbersome and necessary steps. Although it has been done many times, but because of the cumbersome steps, it is easy to forget, the following small set up a time to build the
The last article introduced the Linux to build the FTP server method, said the basic configuration of vsftpd, that is, anonymous and local, this time to configure the virtual user to use VSFTPD, the following is the specific steps:
First, establish
Here today we discuss a very funny system configuration error in Linux systems, which is sudo, and why it's funny, because if it's improperly configured, it's easy for the average user to claim root, and without a bit of technical content, System
If, for, while almost all the keywords in all programming languages, in Shell programming is no exception, where if is the most frequently used, because shell programming does not exist in the concept of objects (object), so in the comparison of the
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])
Linux access to new Gmail Mail via command line without entering @gmail.com part
#!/bin/bash
num= "\033[1;36m"
end= \033[0m "
read-p" Enter your mail: "Name
read-p" Enter Pass of Mail: " Pass
atom= ' wget-qo-https://$name: $pass
#!/bin/bash #extracting command text_text_text_line options as Parameters Help_info () {echo "NAME" echo "\t$0" Ech O "Synopsis" echo "\t$0 is a shell test about process Options" echo "DESCRIPTION" echo "\toption like-a-B param1- C param2-d "} If [$#
First, the arithmetic operation
Copy Code code as follows:
+ - * / %
second, the relationship operation
Copy Code code as follows:
>=
Third, the test operation
Testing command: Test [] [[]] [(
About the shell in the for loop usage a lot, always want to sum up, today on the Internet to see a summary of the use of the loop, feeling very comprehensive, so turn around research, HEI ...
Copy Code code as follows:
For
If you're dealing with a shell script and it's a common thing to traverse a time range, share it with you today:
Copy Code code as follows:
#!/usr/bin/env Bash
Date1= "$"
Date2= "$"
echo "Date1: $date 1"echo "Date2: $date 2"
In the previous example of Shell programming, it was mentioned that the shell script was extended and redirected to a file for viewing and debugging http://www.jb51.net/article/62435.htm. However, if there is another situation: redirect only in some
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