# #! There is a space followed by a space followed by the full path of the interpreter and must be correct.#! /bin/ashPro_path= ""# Testpro is an executable program to be guarded, which guarantees it is always runningProgram= "Testpro"# This script
List of special variables
variables
meaning
$
File name of the current script
$n
Arguments passed to the script or function. N is a number that represents the first few parameters. For
How to assign the return value of a shell command to an application's variable.Bo Master recently made a router project, need to get the router now network status and parameters, using the UCI get GET,However, with system ("UCI get"), the obtained
Online check a lot, no effect, wrote a, although a bit, but the function can still be realized. Talk less, look at the shell.#!/bin/shfunction main {lines= ' Ps-eo user,pid,cmd | grep-v root |grep sshd '; tmp=0;array= (); for i in ${lines[*]}doif [$
Because spark-1.3 as a milestone release, add a lot of features, so, it is necessary to study a, spark-1.3 need to scala-2.10.x version support, and the system on the default Scala version of 2.9, need to upgrade, You can refer to Ubuntu to install
Grep-I ignores case-I skipping binary files-C Calculated Quantity-N Display Line number-R recursion-V does not match a keywordCommon combination CommandsGrep-iirn keyword * Search for files containing this keyword (n displays line numbers, I ignores
1. Give a file with IP , one IP line, to count which IP has the most occurrences. Ip_input.txt content is as follows:219.217.49.14175.43.4.8787.48.98.159.73.38.25219.217.50.1459.92.48.32219.217.49.1459.72.38.14259.73.38.25219.217.49.14The following
Very depressed, do not know what the reason, on the virtual machine to get that, the Centos6.5 seems to make a problem, the use of SSH remote landing on the CentOS, only show:bash-4.1#, very strange, whoami the root permissions displayed, PWD
Programming Ability:Script programmingProgramming languages: Machine language, assembly language, advanced languagesAdvanced Language:Static language: Compiled languageNo additional binaries are required, and a compiler is required to directly
Recently the leader has given a task to deal with the line-piece server, unwanted pictures to remove it.Idea: First the line to use the image from the database to export, the table has a picture path, and then the path to generate a txtFinally, each
Xcode statistics code, with the shell command can be very simple. Open the terminal, enter your project directory, execute the following codefind . -name "*.m" -or -name "*.h" -or -name "*.html" -or -name "*.c" |xargs wc -lIf you want to count iOS
There are many shell types in Linux, common: Bourne shell (/user/bin/sh or/bin/sh),Bourne Again Shell (/user/bin/bash or/bin/bash),C Shell (/user/bin/csh or/BIN/CSH),TC Shell ((/user/bin/tcsh or/BIN/TCSH).The Bourne shell (i.e. sh) is the first
Use the read command when you need to get input from the scripting people during the execution(1) Basic readingThe read command accepts standard input or other file descriptor input. After reading the data into a standard variable.- p allows you to
The library to be backed up, passed in as an argument, delete the backup file from the previous 30 daysThe backup directory is created if it does not exist,/back/mysql/#!/bin/bashDatabase=$1Username= "Root"Passwd= "Redhat"Backupdir=
Package com.yc.utils;Import java.sql.SQLException;public class Shellutil { Private Boolean flag=false; private int xx; The x-axis of the mouse position when you click the interface private int yy; The y-axis of the mouse position when you
When we need to find a specified file in thousands of files, we may be able to use LS filename. The results will list some information about this file. But this is not the best way. Or specify the rules of the file, LS obviously can not meet our
Execute the system command and write the shell script that writes the output to the specified log file (2)
The previous article was a simple script that can be executed and written into logs. However, if it is placed in the production environment,
Shell scripts that execute system commands and write output to log files
This is probably the requirement. Run the usysfault command on the aix system to retrieve the fault light information. However, it seems that only the root user can execute
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