Tag: blog http OS file 2014 Art
Preface:
Spark has been very popular recently. This article does not talk about spark principles, but studies how to compile spark cluster construction and service scripts. We hope to understand spark clusters from the perspective of running scripts. spark is 1.0.1. spark clusters are built in standalone mode. The basic architecture is master-slave (worker mode), which is composed of a single master node and multiple slave (worker) nodes.
Now we will introduce the test main program: Test. Exp.
To facilitate the addition of new test projects, the main program uses a flexible mechanism, which calls the corresponding sub-test programs through the source command as needed. In this way, each test point can be put into a single file and then referenced by the main program.
First look at the Code:
#! /Usr/bin/CT --
# $ ID $# Usage:#./Test [-uuser] [-ppassward] [-iip_address] test_001...# Or./test [-uuser] [-ppassward] [-iip_address] [-
Shell basic exercises: using the read interactive input, command-line script 2 ways to implement input 2 integer numbers, and calculate subtraction. The basic knowledge of shell includes: variable definition, read, if Judgment statement, regular expression and so on.
First way: Read Interactive input parameters
The idea is: t
= Time.mktime (Four_weeks_ago.timetuple ())
# list all files in the directory
Files = Os.listdir (dir)
# Open the file log you want to delete
FH = open (logfile, "w+")
# traverse the file to print out the file creation time
For f in Files:
# ignore. The file that begins
If F.startswith ('. '):
Continue
# ignore the directory under the current directory
If Os.path.isdir (Os.path.join (dir,f)):
Continue
# Get the Modify time of the file and convert it into timestamp format
File_time
The script consists of four files: tar. sh-> loop. sh-> loginfo. exp. The script logs on to each vswitch in sequence, runs the "tftp 192.168.36.44 put vrpcfg.zip" command on each vswitch, and renames the saved configuration file to the corresponding vswitch IP address. Finally, all operations are completed by packing the file name into a file on the current day. Www.2cto.comAmong them,. sh is a shell
Note:
The "early preview version" indicates that some functions of the software are implemented and previewed, and the existing functions are unstable. Major modifications may be made to later versions. You are welcome to report bugs and follow the updates.
For version updates, see the mgen haiyunguo project.
In the early preview version 1 of the haiyunguo project, only the use of selector and filter is demonstrated. After the early preview version 2
1. Projects and TasksThe Gradle build script consists of two basic concepts, namely the project (projects) and the task (tasks).Projects refer to our build artifacts (such as jar packages) or implementation artifacts (such as Web application, etc.). The gradle build script contains one or more projects .Tasks are the smallest unit of work that can be divided, and perform build work (such as compiling some c
In the project Vue.js in the 1.x version of the switch to the 2.x version of the problem is that when the 1.x version is instantiated, the DOM string inside the script will not be filtered out, but the 2.x version will be filtered for example:Script content after the 1.x version is instantiatedScript content after the 2
at run time. The default setting is logo.S saves the user's current command-line options.T:NN Enable timeout: The maximum number of seconds a script can run. The default setting is unrestricted. The T parameter prevents excessive script execution by setting a timer. When the execution time exceeds the specified value, CScript interrupts the scripting engine with the Iactivescript::interruptthread method an
Beginning Python From Novice to Professional (2)-run the Python script on the command line, novicepython
Run the Python script on the command line.
Create a hello. py file in Linux
$ Gedit hello. py
Input:
#! /Usr/bin/env pythonprint 2 + 2Save and exit. Run:
$ Python hello. py 4We can also make it run l
The script is: nohup/mnt/nand3/h2000g >/dev/null 2>1 for 1 more accurately said file descriptor 1, and 1 The general Representative is Stdout_fileno, which is actually a dup2 (2) call. He outputs the standard output to All_result, and then copies the standard output to the file Descriptor 2 (Stderr_fileno), The conse
U-Mail system injection 2 (SQL Injections in MySQL LIMIT clause, No Logon required, with a script for getting the user password)
SQL Injections in MySQL LIMIT clause, which is not strictly filtered and generates blind injection. As a result, the user name and password can be injected without logon.
The last search was only performed on the client. Today, I did not search in the fast directory and found anot
For more information, see a rbac SQL script (2) http://blog.csdn.net/enjoyo/archive/2007/07/21/1701641.aspx.
This is the script for Derby (it can be used as a reference for learning the Derby database)
--*************************************** *****************************
-- Membership SQL
Derby
--
-- INSTALLThe tables and initialize the member
Practice 2, write a script/root/bin/yesorno.sh, prompt the user to enter Yes or no, and determine whether the user entered Yes or no, or other information #!/bin/bash# case$1inyy]| [YY] [EE] [Ss]) echo "Youputa$1" ;; [nn]| [NN] [Oo]) echo "Youputa$1" ;; *) echo "Ukown" ;; NBSP;NBSP;NBSP;NBSP;ESACNBSP;NBSP;NBSP;ESCA3, write a script/root/bin/filetype.sh, determin
Parameters passed by awk to the script (2)
An important limitation of command line parameters is that they are unavailable during the in process. That is, they are available only after the first line is entered. Why? This is a confusing part. Parameters passed from the command line are processed like file names. The value assignment operation is performed only when the variable (if it is a file name) is eva
Command line run Python scriptLinux first create a hello.py$ gedit hello.pyInput:#!/usr/bin/env PythonprintSave exit, run:$ python hello.py 4We can also make it perform like a normal programBefore executing, let the script file have the executable properties:$ chmod a+x hello.pyTo run the script:$./hello.py 4You can also remove the. py to make it more like a normal program:$ cp hello.py HelloTo run the
, the grep command output serves as the wc command input. Of course, you can use multiple commands.
Redirection: output the command result to a file instead of a standard output screen ).
> Write the file and overwrite the old file
> Add it to the end of the file to retain the content of the old file.
Backlash
You can use a backslash to output a command as a command line parameter of another command.
Command:
Find.-mtime-1-type f-print
Used to search for files modified in the past 24 hours-mtime
Event functions (2) Function checkpassword (password: string): Boolean; If you installProgramInPascalThis function is found in the script. It automatically displays the password page and callsCheckpasswordCheck the password. ReturnTruePassword accepted.FalseReject. TestCodeAs follows:
Function checkpassword (password: string): Boolean;BeginIf Password = 'castor' thenResult: =
RedHat software management-script Installation
I. Decompress
Tar-zxvf webmin-1.700.tar.gz
2. Go to the relevant directory
CD webmin-1.700
3. If you execute./configure at this time, the system will prompt that configure does not exist.
If the source code package is not installed in Linux, it provides detailed instructions, such as readme or install
4. view instructions
VI readme
5. Follow
21. splicing with cat the 1cat command is a simple command that is commonly used. cat itself indicates concatenate (splicing) 2. reading files with cat generally amp; 26684; is catfile1file2file3.
2.1 splice with cat
1 cat command is a simple command that is commonly used. cat itself indicates concatenate (splicing)
2. the general format for reading files with cat is
Cat file1 file2 file3. .. // This comma
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.