Recent programming uses SFTP upload files, and need to use crontab preset timed upload events. Unlike FTP, SFTP does not provide options such as-I can encode the password directly into the program. Using the SFTP directive, the user is automatically
In the loop, sometimes you need to force out of the loop when the loop end condition is not reached, and the shell uses break and continue to jump out of the loop.The break command allows you to jump out of all loops (all loops after the execution
With the shell program more and more, found that each write has different habits or define different things, variable name definition is not the same, the entire program indentation is not uniform, no comments and other issues, and I looked back at
1.echoAndif else fiCommand#!/bin/bashecho hello;echo therefilename=demo.shif [ -e "$filename" ]; then echo "$filename already exists!";cp $filename $filename.bakelse echo "$filename does not exist!";fi;echo "File test complete!"Run result
Safety planning for Springboard machine:Back-end server--center machine, Springboard machineSpringboard machine: Used as a springboard Landing center machineCentral machine: Commonly used for distribution, used to log on to the backend serverIn the
ReasonThe GB2312 encoding used by Windows, most Linux systems support UTF-8 encoding, while remote login uses local encoding.Scenario One: Modify the files in the Linux hostvi/etc/sysconfig/i18nThe original content is:Lang= "ZH_CN. UTF-8 "Modified
This example of the book needs to be supported in Ubuntu's lower version of the system, and now basically does not support, want to implement it is very simple to write a script to back up and then delete.Alias has just made a replacement.Alias rm= '
File Checksum MatchingIf you suspect that there may be many files with the same Nevin , instead of comparing all ranks comparisons with cmp or diff , The amount of time that is spent will increase as the number of files increases to the sub-party .
Original address: http://blog.chinaunix.net/uid-24607609-id-2118151.htmlThe syntax for the most streamlined if command is:if TEST-COMMANDS; then CONSEQUENT-COMMANDS; fiafter the Test-command executes and its return status is 0, the
This article main reference: HTTP://PUBS.OPENGROUP.ORG/ONLINEPUBS/9699919799/UTILITIES/V3_CHAP02.HTML#TAG_18_06_02Other information:http://www.ibm.com/developerworks/cn/linux/l-bash-parameters.htmlThe parameter extension is represented as:
Write the shell for a long time, often be unusually troubled, can unexpectedly adhere to a number of years useless, recalled the previous service company, Amitabha, sin sin. Talk less, hope this article can help you and I completely end the shell
N years ago bought a tp-link 841n V7, has been used to calculate, in addition to not regularly restart the router, or slow speed of the Turtle crawl Ah! This is also TP original firmware of common problems, so brush dd-wrt, say DD really cool, in
Recently, in the post-maintenance of a system. This is a kind of system, we take the method is, in our local area network server, there is a user server and a touch of the same database, the program is also a touch. After this modification, we copy
In Windows, the command line encoding is cp936, while the D: \ python27 \ scripts \ scrapy script encoding is Unicode. If you start the command line, the encoding problem may occur.Solution: Modify the scrapy file under D: \ python27 \ scripts \.
Shell Environment Variable Classification and set env export differences:
Set: Display (SET) private variables and user variables included in Shell variables. Shell of different classes have different private variables bash, KSh, and CSH. Each shell
Origin: in the shell programming teaching conducted by old boys in Linux training, many well-experienced netizens and students are still confused about arrays. The following is a small example of array usage, hope to help you. In fact, the shell
If you want to quickly and easily understand shell programming, here is also a simple tutorial link: http://www.ooblick.com/text/sh/There is also a little deeper Cu shell version of the town board treasure classic thirteen ask
First, make sure that the file has executable permissions.# SH> chmod A + x filename
Then modify the file format# SH> VI filename
Use the following command to view the file format: Set FF or: Set fileformat
The following information is
Tlcl-view the world echo in shell eyes
View the world in shell eyes
Echo-display a line of text
When you enter a command, bash expands the input characters before executing the command.
Expand path
Echo *
Shell expands * to the name of the file in
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