Http://blog.csdn.net/pipisorry/article/details/39406501
Non-formatted input/output functions
These functions can be replaced by the standard formatted input and output functions described above. However, these functions have less code after
Bash concise tutorial -- variables, bash concise tutorial Variables
1. Preface
Bash is a popular scripting language in * nix systems. As a scripting language, variables are the basic elements of a language. In this tutorial, we will learn how
SHELL script strategy (Study Notes)-1.6 mathematical operations and bc commands, shell-1.6
Directory:
1.6.1 basic Integer Operation
1.6.2 bc command advanced arithmetic operation
Use let, $ (), or $ [] to perform basic integer operations. Use bc for
Variable
Get local host name# Hostname
Obtain the System Version Number# Uname-r
Obtain CPU type
Obtain the cpu operation frequencyCat/proc/cpuinfo
Obtain memory usage# Free-m
Obtain hard disk usage# Df
Variable types and variable operations
Variable assignment
Variable access
Variable input
4.1 variable assignment
In shell programming, all variable names are composed of strings and do not need to be declared. To assign a value to a variable, the format is as follows:
Variable
In Linux, you can specify an alias for an alias command: in Linux, if the command is too long and does not conform to the user's habits, you can specify an alias for it. Although you can create a "Link" for a command to solve the problem of long
Shell programming Basics
Leal
Authorization license:
Create sharing agreement
GNU Free Documentation License
Edited by: firehare, dbzhang800
We can use any text editor, such as gedit, kedit, emacs, VI, to write shell scripts. It must start with
(In the finishing)In Python, a type belongs to an object, and a variable is of no type:A=[1,2,3]a="Runoob" In the above code, [All-in-one] is a list type,"Runoob" is a String type, and the variable A is no type, she is simply a reference to
Java Annotations (Annotation) are equivalent to a tag, and adding annotations to a program is tantamount to marking a program with tags that can be added to packages, classes, properties, methods, and local variables. You can then write an
Python3 functionFunctions are well-organized, reusable pieces of code that are used to implement a single, or associated function.Functions can improve the modularity of the application, and the reuse of the code. You already know that Python
Define a function
The first line of the function statement can optionally use the document string-for storing the function description.
The function contents begin with a colon and are indented.
return [expression] ends the function,
Python3 functionFunctions are well-organized, reusable pieces of code that are used to implement a single, or associated function.Functions can improve the modularity of the application, and the reuse of the code.Like C, Python provides a number of
First, supplements1. All the data in Python is built around the concept of objects. Objects contain some basic data types, such as numbers, strings, lists, tuples, dictionaries, and so on, so that all the data stored in the program is an objectEach
What is a q:1 shell script and is it required?A: A shell script is a text file that contains one or more commands. As a system administrator, we often need to use multiple commands to accomplish a task, and we can add all these commands in a text
This article directory:1.6.1 Basic Integer Arithmetic1.6.2 BC Command Advanced arithmetic operationsuse Let, $ (()), or $[] for basic integer operations, using BC for advanced operations, including decimal operations. Where the expr command can also
function definition
The function code block begins with a def keyword followed by the function identifier name and parentheses ().
Any incoming parameters and arguments must be placed in the middle of the parentheses. Parentheses can be
Variable
In Python, a type belongs to an object, and a variable is of no type:Temp = [1,2,3]temp = "Runoob"In the above code, [All-in-one] is a list type,"Runoob" is a String type, and the variable temp is no type, he is simply a reference to
Function: A function is a block of code that can be called repeatedly. Arguments can be passed, and different parameters return different values. There are three ways to declare a function: 1. A code block that is declared by a function command
1. Compiler 1.1. Compile period classificationA *.java file is generally compiled and run, and involves two types of compilation periods:① Compile-time compilation: The process that generally represents *.java->*.class (contains bytecode)-also
Python functionsFunctions are well-organized, reusable pieces of code that are used to implement a single, or associated function.Functions can improve the modularity of the application, and the reuse of the code. You already know that Python
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.