1/etc/profile2 ~/.bash_profile3 ~/.BASHRC4 $PATHWhere/etc/profile is the global environment variable that takes effect for all users, while. Bash_profile only works on the current user.~/.bash_profile: Each user can use this file to enter shell
Log files are one per day. A keyword in the statistics log file that gets the number of views per day. Save the number of times to the TXT file.Save the date in the TXT file as well.Enter a start date and an end date to count the number of times per
Tag: will return CTR Word delete Move page ackMove cursor
ctrl+b: Move forward one character (backward)
ctrl+f: Move back one character (forward)
alt+b: Move forward one word
alt+f: Move back one word
ctrl+a: Move to the
MY.CNF configuration format is as followsVI my.cnf[Client]port=3306Socket=/tmp/mysql.socket[Mysqld]port=3306Server-id=1Datadir=/usr/local/mysql/data[Mysqld_safe]port=3306More parsemy.sh#!/bin/bashcnf=$ (CD ' DirName;p wd) "/MY.CNF"#得到区块数组g_sec= ('
Shell script is a "program" written using the shell's function, which uses plain text files to write some shell syntax and instructions (including external instructions), with regular expressions, pipeline commands, and data flow redirection. In
Delete the first line in the file file1 to the line containing word characters and redirect to the file File2:Sed ' 1,/word/d ' file1 > File2Keep the lines in the file file1 that contain word characters and redirect to the file File2,-n to indicate
Requirement: One file displays the content three line as a lineIdea: is the second line of content, the contents of the third row is appended to the first row, so that the contents of three lines can become a row, if not enough three lines
The origin of 3. shell basic knowledge 3.1 shell 3.1.1 bourne agin shell 3.1.2 the other shells, have zsh, ksh 3.2 see if shell 3.2.1 yum list | grep zsh 3.2.2 ls /root/.bash_history 3.2.3 echo $
Scripting features: Display all disks and select, partition all selected disks, repartition partitions and format file system#!/bin/bash# Display all disks and select, format partition of selected disk, repartition partition and format file
To find files that end in INI[[email protected] app]# Find/-name "*.ini"/app/myblog/config.iniEXEC explained:The-exec parameter is followed by command, which terminates with '; ' To end the sign, so the semicolon behind this command is indispensable,
1, Shell Equality comparison note-eq Comparison of numbers equal= = Comparison of string equality2, = = and the difference= = can be used to determine if a variable is equal, = In addition to being used to determine whether a variable is equal, it
Shell for LoopThe syntax for the Shell for loop is as follows for inch List Do command1 command2 ... CommandN DoneExample: for inch {1.. - } do echo $i Done Class C language is also possible for ((i=1; i; i + +)) do
Shell Branch Statement Case inch mode 1) Command1 command2 command3 ; Mode 2) Command1 command2 command3 ;; *) Command1 command2 command3 ;; EsacDescription: After the case is taken, the value is the keyword in,
Reprinted from: http://my.oschina.net/u/1032146/blog/146941What is here Document?Here Document is a special redirection method in the Linux Shell, and its basic form is as followsCMD Here Document ContentDelimiterThe function is to pass the contents
File system1. File system partition structure is divided into Inode group and data domainThe 2.linux file is divided into directories and binary files3. Catalog items are stored in the directory, and the directory entry records the file name and
Using Qprocess Qthread============================================#include int main (){Qprocess::execute ("LS");return 0;}============================================
Qprocess *poc = new Qprocess;poc-> Start ("Ping 222.207
$* all positional parameters, being used as a wordNote: "$*" must be referenced by ""[email protected] is synonymous with $*, but each parameter is a separate "" reference string, which means that the parameters are passed completely, are not
$# the number of arguments passed to the script$* Displays all parameters passed to the script in a single string. Unlike positional variables, this option parameter can be more than 9 $$ The current process ID number for the script to run $!
There are several places in the recent new project where you need to invoke the shell script, which records a simple shell script invocation method. The code is as follows:private void Callsh () {InputStreamReader STDISR = null;InputStreamReader
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.