Turn: Several cases of sqlplus and shell passing value to each other

Several cases of sqlplus and shell passing value to each otherScenario One: The simplest invocation of sqlplus in the shell$cat test.sh#!/bin/shSqlplus Oracle/[email Protected]>file.log SELECT * from Test;ExitEOF #注意EOF要顶格写$sh test.sh$cat

grep commands in Shell script programming

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

Conditional judgment in a Linux shell

1. Exit statusIn a Linux system, every time a command executes, the system returns an exit state, which is stored in the variable, which is an integer value that we can determine whether the command is running correctly.Typically, the exit status

Shell script invokes the specified function through parameter passing

When we write functional scripts, we tend to place functions that are similar in operation or similar in parameters into the same shell script, which is easy to manage, easy to maintain, and clear. In this case, the usual approach is to define all

Usage of sed in Shell (mode replacement)

ZZ: http://doc.linuxpk.com/80440.html Sed (Stream Editor) usage: 1. It is a non-interactive text stream editor. It edits a file or copies the text exported from standard input. 2. Specify the text line to be changed using the row number or

Learning and using bash shell shortcuts

Learning and using bash shell shortcuts By fenng|It can be reproduced. During reprinting, it must be indicated by a hyperlink.ArticleSource and author information and copyright notice Web: http://www.dbanotes.net/techmemo/shell_shortcut.html This

Basic shell knowledge

Shell scripts contain several Unix commands or executeProgram.   1. Run the shell script There are two ways to run shell scripts. The first method is to use the sh command to take the shell script file name as a parameter. This method requires

Shell loop syntax

While do done, until do done (indefinite loop) In general, the most common status of an indefinite loop is the following two states: While[Condition] The status in the brackets is the limit type.DoDoIt is the beginning of the

Chapter 2. Learning the conditional attention style of shell scripts

  Use if... then Single-layer, simple conditional   If [conditional statement]; then Command work content that can be executed when the conditional statement is set; FI   & Stands for and; | Represents or;   ["$ YN" = "Y"-

Game Development History (shell digital games)

I originally wanted to write some shell scripts to train the trainer. I just wanted to give it a guess. so there will be a follow-up event. the most primitive guess script was first written. both functionality and aesthetics are unsatisfactory.

Shell script Practice Notes (10)-read the spark cluster script fragments

Preface: Through studying spark cluster scripts, take notes on some important shell script skills. *). Get the directory of the current script sbin=`dirname "$0"` sbin=`cd "$sbin"; pwd` Code comments:# The above code is a common technique for

Shell Command sshpass non-interactive SSH password verification

Tag: Shell Shell Command sshpass non-interactive SSH password verification # Install sshpasssshpass : Http://sourceforge.net/projects/sshpass/ Download it as a tar.gz compressed package. $ Tar-zxvf sshpass-1.05.tar.gz $ Sshpass-1.05 CD $./Configure -

Shell-function, array definition and call

#! /Bin/bash # Returning an array value Function arraydblr () { Local origarray Local newarray Local Elements Local I Origarray = ('echo "[email protected]" ') Newarrray = ('echo "[email protected]" ') Elements = $ [$ #-1] For (I = 0; I { Newarray

Eight extensions of Shell

Recently, in the process of sorting out bash knowledge, I had the honor to read the man bash document. For a while, I was just like a hacker, and many places I didn't understand were suddenly open-minded. Now I want to share one of them, at the same

BASH Shell execution, troubleshooting, and startup configuration files

1. Execute bash shell:(1) Go to the directory where the shell script is located: CD/root/tmp and execute./test. Sh. (2) execute shell script:/root/tmp/test. Sh in absolute path mode. (3) run the script CD/root/tmp bash test. Sh, sh test. Sh, or bash/

Call another script in shell script

Call another script in shell script Bash shell commands are divided into two types: External commands and Internal commands. External commands are implemented through system calls or independent programs, such as SED and awk. Internal commands are

How to test the correctness of shell scripts

Blog has been migrated, new address Bytes ---------------------------------------------------------------------------------------- In practice, you need to test the correctness of shell scripts. How can we test in the fastest and most effective

Shell character to ascii code or number Conversion

One idea is to use awk to first create a conversion table between characters and ascii codes or numbers in the awin of awk, and then read the character table to be converted to output the corresponding conversion code. The following sample code

JavaScript uses Node. js to write Shell scripts.

eol

Access Parameters You can use process. argv to access the command line parameters. It is an array containing the following content: [NodeBinary, script, arg0, arg1,...] That is to say, the first parameter starts from process. argv [2]. You can

Shell script execution error & amp; #39; \ 357 \ 273 \ 277 & amp; #39;: commandnotfound Solution

Shell script execution error & #39; \ 357 \ 273 \ 277 & #39;: commandnotfound Solution 1. Delete the BOM and execute the following command under vi. : Set nobomb 2. cause: The so-called BOM is the Byte Order Mark, which is a Unicode character

Total Pages: 541 1 .... 140 141 142 143 144 .... 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.