Source: This article originates from: http://sinbad.zhoubin.com Author: Unknown (2002-12-12-06:02:00)
Simple and easy to find, and learn it as a socket programming example. /**/ /*======================================================================
Error description: Direct start Spark-shell,pia, error, has been so started, ah, a little wrong. When you are in a bad mood, really want to delete it, and then the next version to use. But think about if the download is also this appearance, then I
I'm going to look at the database in Eclipse and operate it through CMD. Directory path is:/data/data/com.abc.oa
It is more convenient to use the SqLite3 command directly in the ADB shell.
1. Open cmd
2. Direct input to adb shell
3. Enter
No.1: Using expreg. R= ' Expr 4 + 5 'Echo $rNote : There should be a space between the operators and operands in the 4 + 5 expression
# finally found the reason, to force Ah.
In addition, for multiplication operator *, use expr needs to be added \
The most crude version
Shell code find. -name "*.java" |xargs wc-l|grep "Total" |awk ' {print $} ' find. -name "*.java" |xargs cat|wc-l #Output: 37634
The above two sentences are the same, but the second one is to use cat to merge the contents of
When executing a jar package from a command line or shell script under Linux, if the jar package does not refer to an external jar package, it is very easy to do so simply by using the following command:
Java-jar Test.jar #注意, if you do not
There are two ways to let echo output a color
1. Define the color variable in the shell script and use ECHO-E to invoke the variable
2. When defining variables, define the ECHO-E into a variable, and then output the variable
Shell script that allows
Question: Sometimes it is convenient to debug with a scrapy shell, but sometimes using the Scrapy shell returns 403, such as the following:
c:\users\fendo>scrapy shell https://book.douban.com/subject/26805083/ 2017-04-17 15:18:53 [scrapy.utils.
This article mainly describes how to output colored content in a shell script.
In a shell script, both Echo and printf can output content. Let's look at the following example
Echo-e "\033[43;35m David use echo say hello world \033[0m \ n"
printf "\
Because of the job needs, because to determine whether rsync is successful, at first I was to judge the local file there is no to that do quiteSafety, now to push the data past, I can not judge, only with the rsyncreturnIn the first place, the '
Recently work required, wrote some shell scripts to do server one-click Package Update,
Traversing a folder with a for recursion contains spaces in the file name, which is treated as two files
Workaround: Modify the delimited IFS
#! /bin/bash
Shell commands, which can be split by semicolons, or by line breaks. If you want to write multiple commands in one line, you can pass the ";" Segmentation.
Such as:
bldr:deyuy/bin/my_shell>>a=5;if [[A-GT 4]]; then echo ' OK '; fi;
If statement
#!/bin/bash
db_ip=
Db_user=
Db_passwd=
Db_name=
a=98000000
function Addsql ()
{
Ine2=$1
Ine3=$2
#sql1 = "Update table name set list = ${ine2} where id= ${ine3};";
sql1= "Update table name set sex=0 where id= ${ine3};";
echo $sql 1
Mysql-u $DB
Some time ago in the study shell script, the last mention of the SED mode space and maintain the concept of space, but has not studied well, these two days studied, so it sent, not very comprehensive, just for your reference.
Keep the space sed
Using echo to display colored content in a shell script requires the use of the parameter-EThe format is as follows:" \033[Word background color; text color m string \033[0m"For example:" \033[41;36m Hello World \033[0m"Where 41 of the position
Today, there is a very strange problem, the shell script that has been running very normal failed, but yesterday added a parameter.Error message:/bin/bash^m:bad interpreter:no such file or directoryLater found that root cause, modified the file
Shell and Export commandsAfter the user logs on to the Linux system, a user shell is launched. In this shell, you can use the shell commandor declare a variable, you can also create and run a shell script program. When you run a shell script, the
Shell scripts create users in bulk and randomly generate passwordsRequirements: Batch creation of 10 system account OLDBOY01-OLDBOY10, and set the generated password (password is different).Implementation script:#!/bin/bash#Question3For I in $
测试操作符
Common Test Operators
English name
Description
-F file
file
files exist and are normal files True, that is, test expressions are set
-d file
Direct Ory
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