Shell script killoracle Database specified user

Step One: Locate the session information for the specified user, and draw up the execution script: #!/bin/ksh echo "conn Sys/sys as SYSDBA select ' Alter system kill session ' ' | | Sid | | | serial# | | | ' From sys.gv\ $session where

Shell programming implements kill thread __ programming

[Root@centos65 liumengyang]# cat test.sh #!/bin/sh #if The process Exists,kill it pid=$ (Ps-ef|grep java| awk ' {print $} ') pidname=$ (ps-ef|grep java|grep-v ' grep ' |awk ' {print} ') #judge If the process is Running.if Not,restart. If

Linux Shell Single Instance run __linux

#!/bin/sh# **************************************************# * * * Libraries# **************************************************Source/etc/profile;Sleep 2Date= ' date + '%f_%h:%m ' If [x$1!= "X"]ThenDate=$1Fi Echo $DATE Basedir= ' DirName $ 'CD

Use of join in Shell programming _ programming

http://www.51testing.com/?uid-45739-action-viewspace-itemid-185211 JoinSimilar to the Join method in db, there is also a left join right join INNER JOIN, etc.Specifies the way the join is specified by the parameter-A.-A1 represents a row that

The use of regular expressions in the Shell __ regular expressions

Here are two ways to use the shell's regular expressions. use method One: #赋值给变量var read var #定义regex正则表达式 regex= "[0-9]" if [$var =~ $regex]];then #match #do Something fi For example, to match the input, the requirement must be a number

Shell script [operator expression, conditional control statement]

#!/bin/bash #你值得收藏的四则表达式运算. val1=1 val2=1 val3=1 val4=1 val5=1 val6=1 let val7=1 ((val1++)) val3=$ (($val 3+1)) val4= ' expr $val 4 + 1 ' val5= ' bcecho ' val5= ' $val 5 echo ' val6= ' $val 6 echo ' val7= ' $val 7 You should understand the

Branches in the shell

If statementSyntax 1 If condition then command (set) fi The condition here is to use the test statement or the bracketed statement (the previous article has been summed up)Note If statement must terminate with FI Practice: #if test if ["-lt"] # "13

Java executes the Linux shell command and gets the return value __java

Original: http://www.cnblogs.com/enshrineZither/p/3793459.html 1 package com.pasier.xxx.util; 2 3 Import java.io.IOException; 4 Import Java.io.InputStream; 5 Import Java.nio.charset.Charset; 6 7 Import Org.slf4j.Logger; 8 Import

Linux Shell script Programming--cut command __HTML5

Cut-and The Cut command extracts text columns from a text file or text stream. Cut syntax [root@www ~]# cut-d ' delimited character '-f fields The PATH variable is as follows [Root@www ~]# echo $PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/

Use of expr in the Shell

The 1.expr command is generally used for integer values in the general format: Expr argument operator argument The general usage is to do arithmetic operations using expr, such as: [Root@centos ~]# expr 10 + 20 30 $expr 30/3/2 5 (Note that operators

HBase access Mode HBase shell

how hbase is accessed1. Native Java API: The most conventional and efficient way to access;2, hbase shell:hbase command line tool, the simplest interface, suitable for hbase management use;3, Thrift Gateway: The use of Thrift serialization

Shell Advanced Variable operation

first, built-in variables 1. $BASH The path to the bash's binary program file (the path to the script interpreter) $ vim test.sh Enter the code: #!/bin/bash Echo $BASH To run the code: $ bash test.sh 2. $FUNCNAME The name of the current

Shell internal Commands

The Bash command explains that the package program contains some internal commands. Internal commands are invisible in the directory list, and they are provided by the shell itself. Common internal commands are: Echo,eval,exec,export, ReadOnly, read,

Shell parameter Extensions

Recently looking at the script inside the OpenWrt, with too handsome, the following 2 parameters extended expression of large use, all recorded. ${parameter:+expression} If parameter has a value and is not empty, use the value of

Simple backup logs and auto-restart Tomcat shell scripts

#!/bin/sh #backup tomcat1 log lastdate= ' date-d "-7 Day" +%y-%m-%d "logfile=/tomcatlog/localhost_access_log.$ Lastdate.txt if [-F "$logfile"]; Then echo ' exist file ' mv $logfile/tomcatlog/localhost_access_log. $lastdate. Txt.bak Tar

Passing the shell path variable into sed

Everyone must know how to get the sed into the shell variable However, there is a problem with passing in the path variable. #!/bin/bash export vob=/home/fesu/server sed-n '/^vob/{s/\ (vob=\). */\1 ' "$VOB" '/P} ' $VOB/scripts/build/ Makefile

Shell Common function functions

Checkpid: Check if PID already exists, if one exists, return 0 (by viewing the/proc directory)Daemon: Start ServiceKillproc: Kill a processPidfileofproc: Finding the PID of a processPidofproc: Ditto, use the PIDOF commandStatus: Returns the state of

Shell Script Learn

The previous writing test program used scripts to raise interest, combined with specific cases, to test the results of learning. Finally understand a slightly more complex shell script. There are still a lot of technical things in there. Declared

Commands commonly used in shell scripts (i)

seq 1 100The notation of the seriesWc-l count Rows-C bytes-W wordsbasename returns a basic file name for a stringDirName leave the non-directory part except the file nameRead-p "" Name prints a hint and waits for input input information to be given

Shell Common Commands

PM2:Start ----- pm2 Start/bin/www-watch stop ----- pm2 Stop app_name| app_id Display LogView port occupancy and force the release of occupied portsSometimes when the software is turned off, the background process dies, causing the port to be

Total Pages: 541 1 .... 489 490 491 492 493 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.