Shell Basic Features 2

Source: Internet
Author: User

                          Bash of the Base Infrastructure Special Sex2

1. provides a programming environment

Program: Instruction + data

program programming Style:

Process: command-centric, data-serving instruction;

Object type: Data-centric, instruction service to data;

2.Shell Program: Provides programming capability to interpret execution

3. How the program is executed:

3.1 computer: Running binary instructions;

Programming languages:

Low Level: Compilation

Senior:

compiling: Advanced language - > Compilers- à Target Code

C, C + +

Explanation: High-level language-à interpreter-à machine code

SHell, Perl, Python

3.2 Procedural programming Languages:

Sequential execution:

Loop execution:

Select Execute

3.3 S Hell Programming: Process, interpretation and execution

The basic structure of the programming language:

Data storage: variables, arrays

An expression

Statement

4.Shell script: Text file

#!/bin/bash

#!/usr/bin/python

#!/usr/bin/perl

Magic Number: Magic Numbers

4.1 To run the script:

1. give execution permission to make file execution through specific file path;

2. run the interpreter directly and run the script as a parameter of the interpreter program;

5. Variables:

Named memory space:

6. Data storage method:

Characters: 110:24 bits (8 bits in one byte)

Value: 110:8 bits (2^8)

Integral type

Floating point Type

7. variables: Variable type

Role:

1>. Data storage format:

2>. participate in the Operation :

1. the range of data represented :  

Type:

Character

Numerical

Integral type

Floating point type (how to store, how to run??? )

8. programming Language:

Strong type:

Weak type: Bash

All the data to be stored as characters

Floating-point numbers are not supported:

9. logic operation:

TRue (1), False (0)

And:

1&&1=1

0&&0=0

1&&0=0

0&&1=0

Or:

1 | | 1=1

1 | | 0=1

0 | | 1=1

0 | | 0=0

non- :

! 1=0

! 0= 1

xor:

Short - circuit operation:

And:

The first one is 0, the result must be 0;

The first one is 1, the second must be involved in the operation;

or:

The first one is 1, the result must be 1;

the first one is 0, the second must be involved in the Operation


This article is from the "9470860" blog, please be sure to keep this source http://9480860.blog.51cto.com/9470860/1698978

Shell Basic Features 2

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.