1. Install SSH, install Needless to say, always click Next
2. Click SSH Secure Shell Client and click on Quick connect above.
Host: IP address of the connected Linux (on Linux, log on as root, ifconfig view IP address as shown below)
)
User:
[Zxw@host1 ~]$ nl shscp/dump_backup_my.sh1 #!/bin/bash2 #dump MySQL data once per day, the reserve last 7 days data.3 #zhao Xiaowei4 #2014.08.275 Path=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:~/bin6 Export PATH7 dir=
Use expect to implement automatic login script, there are many online, but there is no clear explanation, beginners are generally copied, collection. But why to write this but do not know it. This article uses a shortest example to illustrate the
Today I wrote a shell script that counts the number of source lines in a directory, as follows:
#!/bin/bash
Find. -Name *. Java > Srcfilespathname
Count = $ (wc-l srcfilespathname) # Record the number of source files
echo "Number of source
The Until loop and the while loop mean exactly the opposite, while loops indicate that when the conditional expression is true, the loop is continued, and the conditional expression jumps out of the loop when it is false; The until loop indicates
Both $* and $@ variables provide fast access to all parameters, both of which can store all command-line arguments in a single variable.
The $* variable saves all parameters provided on the command line as a single word and is treated as a single
http://www.51testing.com/?uid-45739-action-viewspace-itemid-185211
JoinSimilar to the Join method in db, there is also a left join right join INNER JOIN, etc.Specifies the way the join is specified by the parameter-A.-A1 represents a row that
Shell judge file, directory exists or have permissions #!/bin/sh mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" #这里的-x parameter judgment $ Whether the MyPath exists and has executable permissions if [!-X "$myPath"]; Then mkdir
The time display command under Data Command Linux, not the Times command, which is the timing command for the commands:
Man date ...%m Month (01..12)%m minute (00..59)%n a newline%N nanoseconds (000000000..999999999)%p locale ' s equivalent of
2017-10-04 Add background account:
Suse10, Huawei Veneer, the first four methods are small white in the actual Linux environment test results, may be the difference between Linux version, and not all scenarios are compatible ... Another small white 2
For example, the
script name is called test.sh Three: 1 2 3 is as follows
./test.sh 1 2 3
After running test.sh 1 2 3
$* is "1 2 3" (enclosed in quotes)
$@ is "1" "2" "3" (wrapped separately)
$ #为3 (number of parameters)
Case 2:
1.1 HBase Command mode
The HBase Shell command provides a TAB key completion instruction.
$ hbase Shell
After entering shell command mode, you can use the HBase shell command to manipulate the data.
Convert an hbase log date ' 08/08/16 20:56:29 '
Let's take a look at some of the basic operations commands of the HBase shell, and I've listed several common hbase shell commands, as follows:
Name
Command-expression
Create a table
Create ' table name ', ' column
The script file name is unzip-batch.sh# bulk unzip the compressed file, unzip the file to the specified directory#!/bin/bashFor zipfilenamefull in ' ls./*.zip 'Do#echo "$zipfilename"Zipfilename= ' basename $zipfilenamefull 'filename=$ (basename
first, built-in variables
1. $BASH
The path to the bash's binary program file (the path to the script interpreter)
$ vim test.sh
Enter the code:
#!/bin/bash
Echo $BASH
To run the code:
$ bash test.sh
2. $FUNCNAME
The name of the current
1, #. /bin/sh Opening
2. Variables:
(1) Definition: variable name = string. Note: = no spaces around; name= "Hello World" for which a string with spaces is assigned;
(2) Citation: Use $nametest, ${name}test.
3. Wildcard characters:
(1) * symbol:
This sort looks more difficult than bubbling selection, inserting, and logically complicated.
Intuitively, I know this is not simple, a little afraid.
There is no way to give yourself a hint of psychology, be sure to read the 8 basic sorting
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.