I tested the product performance a few days ago and ran for several days.Program, Stopped today, because the program is not very stable, the test is complete, it is required to count how many times the program started. So I opened the log file and
The company's network is too bad, syncCodeThe speed is only 15 kb/s !!!
I can't bear to go online and find a shell script:
#! /Bin/bash echo "====== start repo sync ====" repo sync while [$? = 1]; DO echo "===== sync failed, re-Sync
1 history
The history command lists used commands. the user's history command is stored in the. bash_history file in the user's home directory.
491 sync 492 logout 493 go-m3 494 logout 495 go-m3 496 go_m3 497 ll 498 ll bin/499 go-m3
Run the 495
It took me a bit to write this evening. It started with argv, which is a two-digit array.ProgramIt is always not displayed. later it was found that execvp only supports pointer array =. = Okay ....Program idea: After the sub-process is enabled,
Shell built-in command Exec
Shell's built-in command exec is very interesting. It will not start a new shell, but will replace the current shell process with the command to be executed, and clean up the environment of the old process.
Other
Obtain UNIX options: one advantage of UNIX is that standard Unix commands have the same command line format during execution: Command-options parameters. If the shell program is executed in the preceding format, the Bourne shell provides a statement
It has the most basic mathematical computing capabilities in shell, such as expr and let. However, these operations can only process integer data. To calculate decimals, you must use the BC command extension. The following example shows how to
Android automated test shell script (fast asphalt5)
This article is my original, reproduced please indicate the source: http://blog.csdn.net/lhzhang1985/article/details/6580595 thank you!
Because Automatic Testing of the high-speed asphalt5 is
Source Address: http://space.itpub.net/10687260/viewspace-293440
[-A file] true if the file exists.W (g3cu. T * mb7q6a0[-B file] If the file exists and is a special block file, it is true.S8ydayx 'gi0[-C file] If the file exists and is a special
I used shell to write it. At that time, I had a little understanding of it. Now I completely forgot it. But I still can understand it, so I won't write it. They are all simple questions assigned by teachers.
1. Select addition, subtraction,
Unix shell programming (1)
Unix only recognizes three basic file types: common files, directory files, and special files.Normal file: any file on the system that contains data, test, program instructions, or just about anything else.
Number of words
Unix shell programming (2)
Character matchingThe asterisk (*) matches more than 0 characters, and the question mark (?) Match 1 character.For example:Ls [A-Z] * [0-9]Displays the list of objects whose names start with lowercase letters and end
Unix shell programming (4)
Cut commandYou can extract the required data fields from the data file or command output.Command Format: Cut-cchars FileChars indicates the characters to intercept, which can be numbers.File indicates a file. If file is
1. Retrieve the number of times the shell appears in the/etc/passwd file
Problem: The following is part of a/etc/passwd file. Obtain the shell and count the number of times. Shell refers to the following/bin/bash,/sbin/nologin, for example, the
What is shell?
Quote:Shell is a program with special functions. It is an interface between the user and the core program (kernel) of the Unix/Linux operating system. Why do we say shell is an intermediary between the core program of the system and
The process and runtime classes are used. The returned values are obtained using the getinputstream () method of the Process class.
package ark;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import
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.