By failing time after time, I finally master the tricks of writing Linux Shell, the most classical examples were the usage of 'if' sentence in Shell language. Here are the tips and samples:
Semantics:
If [conditions]; then
Command
Fi
Processing object
Although you may not realize it at first, the. NET object is used when working in Windows powershell. As your experience increases, the object processing capability becomes more obvious, and you find that you are using objects, or
In the 1980s s, most applicationsProgramIs to provide a command line analyzer-even now, this is also very important. For many years,. net has been missing a standard analyzer, so developers have to implement this common mode over and over again.
In
Run manage. py dB shell. An error occurs: sqlite3 is not an internal or external command, nor can it be run.
ProgramOr batch files
To operate the sqlite3 database in Python 2.5 or later, two components are required:
1. DB-API modules2. sqlite3
Mysql1 # Cat mysqlbackup. Sh#! /Usr/local/bin/fish # The backup policy is daily full backup # Setting backup path variables Set backupdir/usr/DB/backup # Generate a backup directory Mkdir-p $ backupdir # Delete a backup that has been backed up for
Http:// OS .51cto.com/art/200910/158857.htm
This article describes the basic knowledge of Linux script shell commands in detail, including: 1, 2, comment, 3, variable 4, environment variable, 5, Linux script shell commands, and process control.
1.#-------------------------------------------------------------------------9 # Note that there must be no spaces before and after the assignment.10 # what will happen if there is a space?1112 # If "variable = value ",13 # ^14 # + the script will
Conditional statement if-then Structure
If [condition]ThenCommandsFi
Note: To put then and if in the same row, you need to write the following:If [condition]; thenIn shell.
In addition,There must be a space between [] and condition !!!For more
In Linux applications, there are many ways to call my shell (which is too powerful): fork (), exec * (), pipe, system () in this example, the system ()
It is very convenient to call. It is explained now.
# Include
# Include
Int main ()
{
This book is comprehensive and detailed. It is suitable for beginners to study carefully.
Chapter 2 welcome to the Linux World
1. POSIX standard
2. Linux has kernel programming interfaces
3. Linux supports Secure hierarchical file
########################
Summary of several special shell variables:
########################
######################################## ####################
#
# Http://hi.baidu.com/xece/modify/blog/75327e382149dae23b87ce5a
##########################
LinuxIf command
WhateverProgrammingLanguage is inseparable from conditional judgment. Shell is no exception.If list thenDo something hereElif list thenDo another thing hereElseDo something else hereFi Ex1:#! /Bin/shSystem = 'uname-S' #
3D model data has been being parsed over the past two days. I wrote some test code in my spare time today. Analyzes the buffer overflow attack principles and shell code principles used by hackers. OK. Go to the topic. I hope you can correct anything
Continue Process Control
This is case. It can match the variable content and multiple comparison characters. If the matching is successful, this part of code is executed. It can only be a string.
The writing structure is as follows:
Case match
How to Learn shell commands in Linux
I learned some of the scattered linux commands today. The following is a summary:
First of all, when you don't know how to execute commands, of course we need man. Let this man save everyone! Haha!
Common network
If you are an administrator, you can use the following statement to enable xp _ first use SQL Server Management Studio Express to connect to the database Server, and then run the following SQL statement: sp_configure 'show advanced options ',
Linux ShellLittle-known secrets in command lines
/* Pass the test in linux */One day, you wrote a very long command.$ Echo ooooooooooooooooooooooooooooooooooooooooooooYou suddenly don't want to execute it, and you want to delete the entire command,
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