(1) I (not a beginner) Learn Python MethodsBefore starting the text, let me talk about how to learn Python. I have been familiar with many languages, but the code 90% I wrote is C. With some basic computer knowledge, this guy is barely a beginner.
One: string manipulation1. The string can be evaluated by subscript, but because the string is immutable, it cannot be modified by Subscript.Username = ' Li ' username[0]2.The For loop in python, each time the loop is looped, each element inside the
Awk is a programming language that has a strong ability to handle document data. The awk name is named after the first letter of the last name of its three original designers: Alfred v. Aho, Peter J. We i n b E rg e R, Brian W. Kernighan.Awk was
Linux shell sed awk command (2)-awkawk syntax Format:awk [Options]-F program-file [--] file ...Options:-F FS,--field-separator FSCreate a delimiter with FS as the input line (the default delimiter is a space or tab)-V Var=val,--assign var=valBefore
awk is a row processor: Compared to the advantages of screen processing, there is no memory overflow or slow processing when processing large files, usually used to format text informationThe awk processing process:Each row is processed in turn, and
#!/bin/sh#[email protected] #Modified According to the actual situation MySQL server IP and username passwordexport bl ack= ' \033[0m ' export boldblack= ' \033[1;0m ' export red= ' \033[31m ' export boldred= ' \033[1;31m ' export green= ' \033[ 32m
Bulk Modify the delimiter of the file, you can use the FS and OFS commandsFs:field Separator, Field delimiterOfs:out of field Separator, output fields delimiterSuppose there is such a file file1.txt, which reads as follows:As you can see, the file1
1 built-in variables (built-in) commonly usedFS input field delimiter default whitespace changed by option-F or re-assigned FSOFS output field delimiter default space, change can be re-assigned valueThe filewidths is separated by spaces Iade defines
>>> Help (print)Help on built-in function print in module Builtins:Print (...)Print (value, ..., sep= ', end= ' \ n ', File=sys.stdout, Flush=false)Prints the values to a stream, or to Sys.stdout by default.Optional keyword arguments:File:a
StringStrings can be stored in any type of string, such as a name, a sentence, and so on.Strings also have many built-in methods for manipulating strings, often in the following ways:1name1='Hello World'2 Print(Name.capitalize ())#Capitalize first
In this tutorial, we will show you how to create a well word game with Python. We will use functions, arrays, if conditional statements, while loop statements, and error trapping.
First we need to create two functions, the first function to display
Copy Code code as follows:
#!/bin/bash
#This the script is Usage for describle CPU Hard memery Utilization
Total=0
Idle=0
System=0
User=0
Nice=0
Mem=0
Vmexec=/usr/bin/vmstat
Which SAR >/dev/null 2>&1
If [$?-ne 0]
Then
Ver= '
There are three main types of file time under Linux:
1.1 Modification Time (mtime)
File modification time, that is, when the contents of the file changes, update this time, does not include file permissions and property modification. Using Ls-l
1. Monitor CPU information with Vmstat tools.Vmstat is a Linux system monitoring tool that uses the Vmstat command to get information about processes, memory, memory paging, blocking IO, traps, and CPU activity.R: The number of processes in the
Linux command The Three Musketeers awkabout awkAwk is the boss of the Three Musketeers, and the power of awk is that it's not just a command, it's a language, it's very powerful. The report generator, which is displayed after formatting, can
Let's start with a brief look at the concept of Linux timestamp atime CTime mtimeAtime:access time when the file (read or execute) or directory was last accessedMtime:modofy time when the file (content) or directory (content) was last
1 name='hu\tqihang' #\ t is the TAB key 1. Printing related1 Print(Name.center (50,'-'))#print a total of 50 characters, not enough to fill, name in the middle2 Print(Name.ljust (50,'-'))#print a total of 50 characters, not enough for-fill, name on
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.