Learn shell programming, every time to do a test, always create a file, give permission, file each edit also write a #!/bin/bash, when the test files are more, still have to organize, or move, or delete ... Kiss, don't bother ...
Here are some of
Write a script:
1, create a function, you can accept the Inode or block two parameters, if the user passed other parameters, then return error message 53 to the main program;
If the parameter passed is an inode, the usage of all the file system
We know that the registry is a very important part of the Win7 system, the registry is the same as the system of the database, the control of the entire computer data, it is important to say that the file in the registry, can not be arbitrarily
[Author]: KwuBased on the Sparksql call shell script run Sql,sparksql provides an option similar to-e,-F,-I in Hive1. Timed Call Script#!/bin/sh # Upload logs to HDFs yesterday= ' date--date= ' 1 days ago ' +%y%m%d
Example: adb shell Sendevent/dev/input/event3 1 $ ((0XCA)) 1The above statement contains $ ((0XCA)) and executes Runtime.getruntime (). EXEC ("Sendevent/dev/input/event3 1 $ ((0XCA)) 1") without error, but will not take effect, the workaround is:(1)
The new company because of some business reasons have good hundreds of group win machine installed MySQL license login More trouble, simply write a shell automatic authorization script, save reuse.#!/bin/bash#author [Email protected]function
by Francis_hao Jul 5,2017Getopts is a built-in command for the shell.OverviewGetopts optstringname [args]Optind,optarg,opterrDescribeGetopts is used by the shell program to analyze positional parameters,optstring contains the option characters that
Script Writing backgroundWhether it is a production environment, a test environment, or a development environment, it is often necessary to use the RM command to delete & batch files in some "important" directories. According to the philosophy of
Tag: Indicates a startup error system output mod writing preface inuxProcessPreface : A process refers to an instance of a running program . The new process consists of Fork () with the Execve () when the system call starts , and then run , know
Interactive shell and non-interactive shell,login shell and non-login shell. First, this is divided into two different dimensions, one is interactive, and the other is whether to log in or not. .
The interactive mode is where the shell waits
To run an app on the spark cluster, simply pass through the master's Spark://ip:port link to the Sparkcontext constructorRun the Interactive Spark command on the cluster and run the following command:Master=spark://ip:port./spark-shellNote that if
The scene of the problem is probably1 Cron calls a Python script2 python script calls a shell script (for log parsing) to get the shell output and then send the messageSimilar to a monitoring task.There is no problem running the Python script
Calculate Script Execution Time:#!/bin/bashUsetime () {Starttime= ' Date +%y%m%d-%h:%m 'starttime_s= ' Date +%s '$Command #根据自己脚本路径, test script File Execution time (SH test.sh)Endtime= ' Date +%y%m%d-%h:%m 'endtime_s= ' Date +%s 'sumtime=$[$endTime
Hell Programming--for in loop-------in format-------
For no $ variable in string
Do
$ variable
Done
A simple string to enumerate through the calendar, with the function of using the in format to cut the string by a space
Security code: Taohuatan depth thousand feet, less than mountain send Me love.File descriptor (FD): The file descriptor is a non-negative integer, and when you open an existing file or create a new file, the kernel returns aFile descriptors, and
Any partition used to 90% send a message to the specified recipient, to 95% on the subject of the message Warning (warning), instructions to send mail program email#!/bin/bash#Updated: 2008-03-03 PM by:leif ([email
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