Example 1: After running the script, the Firefox browser is loaded automatically and the specified Web page is opened. If the user closes Firefox, the script will automatically re-open Firefox again.To end the loop, abort the t2.sh process. Be
Transferred from: http://blog.csdn.net/cybertan/article/details/3235722Transferred from: http://blog.sina.com.cn/s/blog_4c451e0e0100giqg.htmlScenario: Use a shell to see if a PHP program running in the background exits abnormallyIf exiting, use the
Linux Shell Script Raiders notesChapter One: Shell start -up basics1. Variables: In bash, the value of each variable is a string. Whenever you assign a value to a variable, there is no quotation mark, and the value is stored as a string. 2,
Sch Help Shell Scripting Encryption Geneva I. Span style= "Word-wrap:break-word; Font-weight:normal; font-size:7pt; Font-family: ' Times New Roman ' "> introduction SHC (shell script compiler) shell script compiler. by SHC Compiled
1, according to a specified section of the path, the data copy. = head Assembly.txt /ifs1/st_env/user/liyiyuan/liushanlin/1kite_1_2/110817_i809_fcd05cdacxx_l3_insbustbarabpei-119/e3/gap/e3.scafseq_200/ifs1/st_env/user/liyiyuan/liushanlin/1kite_1_2/11
First shell script
Program#!/bin/sh #第一行统一这样写echo ‘abc‘ #输出abc
Run (because the directory is incorrect)[email protected]:~$ test.shtest.sh: command not found
Programme I[email protected]:~$ sh test.shabc
Scenario two (
Experimental environment: The company intranet 2 machines, one is my own notebook (machine name Nb11), one is the company's server (machine name ws100), are Win7 system(Found a strange problem, shell access to the command, Windows, only Werl.exe
by &&, | | Understand the function return values in the shell.I want to implement the following functions:Write a function that determines whether a string contains only numbers, and returns the corresponding flag (yes/no);By calling the function
@1: Sub-string removal${string#substring}The shortest matching $substring is truncated from the beginning of the $string.${string# #substring}The longest matching $substring is truncated from the beginning of the $string.${string%substring}The
grep command SyntaxThe grep command uses an option , a pattern to match , and a file to search , and its syntax is as follows:grep [Options] PATTERN [FILES]If no file name is provided, the grep command searches for standard input.
Options
Environment Variables
$HOMEHome directory of the current user
$PATHA colon-delimited list of directories to search for commands
$PS 1A command prompt, usually a $ character, but in bash, you can use some more complex values. For
First, the questionThe question is simple, look at the following section of tmp.sh code:#!/bin/Shx= "This was theinitial value of x" while a read line; Do x= "$line" = $x/tmp/tmp's Content1,aExecute./tmp.sh, the normal x variable is
1. Download Tomcat Download Linux version (tar.gz) from http://tomcat.apache.org/download-70.cgi link2, unzip, upload and assign permissionsUnzip, use WINSCP to upload the extracted installation files to the/home/software/tomcat directoryand use
If you're dealing with shell scripts and traversing a time frame is a common thing, let's share with you today:#!/usr/bin/env bashdate1= "$" date2= "$" echo "Date1: $date 1" echo "Date2: $date 2" tempdate= ' date-d "-0 day $date 1" +%f " Enddate= '
in this example, the master node has the host name of Master, and the hostname of the slave node is slave1,slave2,slave3, the user name is Hadoop, and the zookeeper version used is zookeeper3.4.5. Run the following script under ROOT to achieve a
14/12/17 19:18:53ERROR shell:failed to locate the winutils binary in the Hadoop binary pathjava.io.IOException:Could not locate exec UtableNULL\bin\winutils.exe in the Hadoop binaries. At Org.apache.hadoop.util.Shell.getQualifiedBinPath (Shell.java:3
Shell programming-sortThe sort sorting operation sorts a row in one or more files according to the set rules. Output to the standard output and will not be saved to any files.-T specifies the filed separator. The default value is space. Multiple
Shell programming-sort and shellsortThe sort sorting operation sorts a row in one or more files according to the set rules. Output to the standard output and will not be saved to any files.-T specifies the filed separator. The default value is space.
Restart tomcat shell and tomcat shell
#! /Bin/bash #1. Determine whether the service is available. 2. restart tomcat if the service is unavailable. #*/30 *****/home/wsm/restart. sh>/home/wsm/restart. log # Stop tomcatfunction killTomcat () {pid =
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.