Oralce SQLPlus and formatted output spool output to a file in a shell script

http://blog.csdn.net/gyanp/article/details/79030561) Format adjustment has the following parametersSet echo on/off displays the commands that need to be executed in the scriptSet feedback on/off indicates how many rows are returned after the select

Sed && awk tools and some common shell scripts

(i) SEDSed is a streamlined, non-interactive, streaming editor that enters edit commands and specifies file names on the command line, and then looks at the output on the screen.The content of a progressive read file is stored in a temporary buffer

Using the shell to complete the size comparison of two numbers

Brief description:Prompts the user to enter two numbers;Determine whether the input content is a number;Numbers do calculations and feedback results;When the calculation is complete, ask the customer whether to continue using;Provides a way for

70 Classic Shell Script interview questions

1) How do I pass parameters to a script?./script argumentExample : Show file name script./show.sh File1.txtcat Show.sh#!/bin/bashcat $2) How do I use parameters in a script?First parameter: $ $, second argument: $ AExample: The script will copy the

For/while loop commands in shell programming

One, for commandIn shell programming, sometimes we need to repeat the command until a certain condition is reached, and the bash shell provides a for command that allows you to create a loop that iterates through a series of values, each of which

Shell script extracts Binlog DELETE statement for recovering data

The Binlog log is as follows:/*!50530 SET @ @SESSION. pseudo_slave_mode=1*/;/*!40019 SET @ @session. max_insert_delayed_threads=0*/;/*!50003 SET @[email protected] @COMPLETION_TYPE, completion_type=0*/;DELIMITER/*!*/;# at 120#160111 16:37:29 Server

Shell ##%%

Suppose we define a variable as:File=/dir1/dir2/dir3/my.file.txtDifferent values can be replaced with ${}, respectively:${file#*/}: Delete the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Remove the last/and left string: my.file.txt$

Recommend a shell custom prompt sexy solarized Bash Prompt

svn

Prompt effect: Code: # sexy solarized bash prompt, inspired by  "Extravagant Zsh Prompt "# customized for the solarized color scheme by sean o ' Neilif  tput setaf 1 &> /dev/null; then    if [[ $ (tput colors)  -ge 256 ]] 2>/dev/null; then     

Get date in shell script

Digital time Transfer Standard Time:Digital time such as: 20151009163000Standard Time: 2015-10-19-16:30:00A= ' head-1/home/xxx/xxx/bin/.status |awk-f= ' {print $ {} ' |sed-r ' s/([0-9]{4}) ([0-9]{2}) ([0-9]{2}) ([0-9]{2}) ([}) ([0-9]{2}] ) ([0-9]{2})

First part Shell Programming 1 basics

Path to the LS Etc/init.d/shell scriptls/usr/local/apache2/Ls/usr/local/apache2/bin/apachectl1. Shell FeaturesOrder history!! !$!n! characterTab key to complete file path or commandAlias a= "B" Unalias AWildcard * Matches 0 or more characters? Match

Getting Started with Shell scripting

Writing the first shell scriptLike other languages, we use any kind of text editor, such as Nedit, Kedit, emacs, vi, etc. to write our shell program. The program must start with the following line (must be in the first line of the file):#!/bin/shThe

Linux in shell variable $#,$@,$0,$1,$2 meaning explanation:

Variable Description:$$ Shell自己PID(ProcessID) $! Shell背景上次执行Process的PID $? 命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 全部參数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出全部參数。 [email protected] 全部參数列表。如"[email protected]"

Shell Foundation three: Loop statement for

First, the Loop statement forloop control statements in Bash :for,while,untilFor loop Syntax 1:For variable name in list;Loop bodyDoneOperating features:First pass: Assigns the first element in the list the variable name definition, then executes

Shell script-L good habit

Original: Http://www.javacodegeeks.com/2013/10/shell-scripting-best-practices.html#BP11 Translation: Aven Most programming languages have a series of codes that use this language to follow good programming

Shell:nohup Daemon Process

If you want to start a shell script in a terminal session, and then have the script run in background mode until it finishes, you can use the Nohup command, even if you quit the terminal session. The feeling of Nohup is to initialize a process to a

Hudson Execute shell script (Hudson boot tomcat Invalid issue)

When using Hudson's execute SH script, if the SH script is a background process, such as TOMCAT services. If you use the default configuration of Hudson, you will find that the SH process has a start-up process, but will not be resident in the

Linux Shell writes system service script

1Pre-work: source code for Apache installation. The installation directory is/usr/local/httpd2 3 Mission Requirements:4 1, available through service httpd start|stop|status|Restart command to control a service5 6 2, httpd service can boot from start7

A simple shell script-----Implement a simple configuration of the virtual machine lab environment

Personally wrote the shell script only to find that this thing is very convenient, when you want to put some trivial, detailed small instructions to complete a single time, the script is undoubtedly the best choice, convenient, fast, the key is

Shell Programming Simple Tutorial

Shell Programming Simple TutorialI can't say how many complex shell scripts I've written, but some simple scripts write a lot. Working under Linux, sometimes bits and pieces of work, if you write a shell script to deal with, you will find that it is

"Linux" shell string segmentation, array access, conditional judgment

Resources:Shell String Split recycle: http://www.shangxueba.com/jingyan/1633455.htmlDescription of the If else and greater than, less than, equal to logical expressions in the Linux shell: http://www.jb51.net/article/34332.htmShell array: Definition

Total Pages: 541 1 .... 120 121 122 123 124 .... 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.