Today's case is the decision to input to the user
#!/bin/sh # validint-validates integer input, allowing negative ints. function Validint {# Validate field. Then Test against Min value $ and/or # max value $ if they are supplied.
If They
Today is about deciding whether the date entered is correct, and using the function in the example 03 before us is code
#!/bin/sh # valid-date-Validates a date, taking into account leap year rules. Exceedsdaysinmonth () {Case $ (echo $1|tr '
Because the work needs to validate the data submitted by the user, this is a simple date validation example, you need to know the students can refer to.
The IF statement in the shell needs to make a regular judgment and check the grammatical
The VI Editor is the standard editor for all UNIX and Linux systems, and it is not as powerful as any of the newest text editors, but simply introduces its usage and a small number of instructions. Because of any version of UNIX and Linux systems,
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
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
Take a look at the wrong code first.
Copy Code code as follows:
#!/bin/bash
For x in ' LS */.*/.* '
Cat $x |do Echo $x
While Read line
Todo
C= ' echo $line |awk-f ' (' {print '} '
#echo $c
i=$ ((i+ $c))
Done
Echo
Done
Echo $i
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 $
Copy Code code as follows:
#!/bin/bash
Send_thread_num=13
Tmp_fifofile= "/tmp/$$.fifo" # script runs the current process ID number as filename
Mkfifo "$tmp _fifofile" # Create a new random FIFO pipeline file
exec 6<> "$tmp _fifofile" #
1. Install MSMTP
luther@gliethttp:~$ sudo apt-get install msmtp
2. Edit the configuration script (~/.MSMTPRC is the default profile, or you can specify the profile path using the-C option)
luther@gliethttp:~$ Vim MSMTPRC
#添加如下内容
Defaults
#logfile/
Using Python for Web development, it is now popular to use UWSGI to invoke Python programs, but using UWSGI for a period of time to find that there is a disadvantage is that every time you change the source code must restart Uwsgi to take effect,
Writing a:
Copy Code code as follows:
#!/bin/bash
While Read line
Todo
echo $line #这里可根据实际用途变化
Done
Writing two:
Copy Code code as follows:
#!/bin/bash
Cat Urfile | While Read line
Todo
Echo $line
There are two uses, one is lazy do not have to submit code, the second is used on the remote server for regular backups.
Copy Code code as follows:
sudo gedit/etc/crontab
When you open it, join the line.
Copy Code code
To get the absolute path of the executing program/script itself, you can use DirName (Realpath (__file__) in PHP, and C # has System.Windows.Forms.Application.StartupPath; Java does not seem to have any more direct method, can only use Codesource to
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