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
1, view namespace
Hbase>describe_namespace ' Ai_ns '2, List all namespace
Hbase>list_namespace,
3, Create a table under namespace
Hbase>create ' ai_ns:testtable ', ' FM1 '
the management of the table
1 See what tables are available
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
Gzexe
Installation and use
The system is self-contained with no installation required.Use the following command to encrypt:
Gzexe tesh.sh
After the encryption is complete, test.sh is the encrypted file, while the source file is backed up as test.
Recently looking for a job, do a pen test to sort algorithm, revisit Hill sort, the first time in the look of the times did not understand ... ⊙﹏⊙ b Khan So put yourself in the first time when the code encountered problems to be sorted out, in order
Linux Common Commands
LS-F: Catalog will show/
[Root@milab ~]# ls-ifl
total dosage
69199780-rw-------. 1 root root 1496 June 8 2016 anaconda-ks.cfg
77471938 Dr Wxr-xr-x. 2 root 6 September 21:49 svntest/
74325841-rw-r--r--. 1 root root 7
After you understand the basic statements, you need to implement your own ideas. Start to do some judgment on the condition of learning.
Test
Test is an expression of a shell program that can be conveniently tested with strings, file states and
The brackets inside the Shell (including the single and double brackets) can be used to test some conditions: arithmetic comparisons, such as whether a variable is 0, [$var-eq 0]. File property tests, such as whether a file exists, [-e $var], is a
Cut-and
The Cut command extracts text columns from a text file or text stream.
Cut syntax
[root@www ~]# cut-d ' delimited character '-f fields
The PATH variable is as follows
[Root@www ~]# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/
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
Phenomenon: Prompt source:not found when source aaa.sh in shell script
Reason: Ls-l ' which sh ' hint/bin/sh-> dash
This means that the dash is used to parse.
Change Back method:
Command line execution: sudo dpkg-reconfigure dash
Select No
One: Cat command
Cat (CONCATENATE) is one of the commands that the command line player must learn first, and he is usually used to read, display, and splice files, but the cat's ability is much more than that, with a line of commands to combine data
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 '
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
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
Unlike Java, PHP and other languages, SH's process control is not empty, such as (the following is the PHP Process Control notation):PHP if (Isset ($_get["q"]) { search (q);} Else { // don't do anything }You can't write this in Sh/bash, and
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