Shell finishing (37) = = = Variable understanding and two exercises

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

The shell implements statistical views and saves the results to a file

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

[Turn]bash shell common shortcut keys

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

Shell parsing my.cnf configuration file

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= ('

[Linux] Shell Scripts

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

Shell: Delete/Preserve a specified line in a file

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

Nginx Log cutting shell by day

#!/bin/bash############################################## #Author: Liuzhengwei-[email protected] #QQ: 1135960569# Last modified:2017-08-16 16:05#filename:nginx_logrotate.sh#description:######################################### # # # # #back_dir

Shell exercises 21 files show content three lines as one line

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

"Linux Series" "Basic Edition" chapter III Shell Basics

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 $

Shell Script Management Disk

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

The Shell Three Musketeers find

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,

Shell Miscellaneous Set

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

Linux Shell Learning Three

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

Linux Shell Learning Four

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,

The here document usage of the Linux shell

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

Linux Series: Shell script programming

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

Several methods of implementing Linux shell calls under QT

Using Qprocess Qthread============================================#include int main (){Qprocess::execute ("LS");return 0;}============================================ Qprocess *poc = new Qprocess;poc-> Start ("Ping 222.207

The difference between $* and $@ in the shell

$* 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

LINUX notes-specific shell variables

$# 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 $!

Java invoke shell script

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

Total Pages: 541 1 .... 444 445 446 447 448 .... 541 Go to: GO

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.