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

Shell programming in Linux

Shell programming1 echo-e recognition \ escape character \a \b \ n \ \x hex \ 08 Binary, etc.#!/bin/bashEcho-e "Hello World"Execute script: Mode 1:chmod 755 hello.sh./hello.shWay 2:bash./hello.sh (this way does not need to give execute permission)1

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$

Automating operations-simple implementation with shell scripts

Review:1 Installing ETCD[[Email protected] ~]# pip install PYTHON-ETCD install ETCD software2 Modify Salt-master configuration file, add configuration, and restart Salt-master[Email protected] ~]# Vim/etc/salt/masterEtcd_pillar_config:etcd.host:10.0.

Rails+unicorn+nginx configuration, Shell startup scripts

1. Nginx configuration file1.1, the project directory is placed in the system/var/www/Upstream App {# Path to Unicorn SOCK file, as defined Previouslyserver unix:/var/www/app/shared/sockets/unicorn.sock Fail_ timeout=0; #server 127.0.0.1:4000

Linux Common Shell command w

WC: View File Statistics usage: $ WC filename1. $ WC fileName$ WC FileNameX Y Z/desktop/helloX: Indicates the number of rowsY: Indicates the number of wordsZ: Indicates the number of bytes/desktop/hello: Indicates file name2. $ wc-l FileName-l

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

Linux shell script implementation kills processes based on process name

Miss the task Manager under Windows, ah, what to look at the pleasing of the program mouse points can be killed.Today in the Firefox browser to browse the Web page, the interface instantly stuck, nothing can point, test, only switch to command line

Shell script to view i/0 traffic on a Linux server network

View shell scripts for Linux server network trafficWhen uploading a large number of files, you can use this script to implement monitoring!#!/bin/sh ## #统计5s内的平均流量, if [  "$"  =  " ];then   echo -" in megabytes e 

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

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

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

Shell function definition and invocation

I. Function definition Grammar: [function] functionname[()]{action; [return int;]} Description 1, can be with function fun () definition, you can also directly fun () definition, without any parameters. 2, the parameter returns, can display add:

Zabbix Auto-discovery combined with Shell enables Autodiscover to consume the largest TOP10 process and monitor its resources

Recently in the thinking of a problem, the online server run a variety of services, it may be running Nginx, another run is MySQL, the other is to run NFS or other services, etc. Through a certain script fixed write some services to implement

Shell Learning 22-shell Function parameters

In the shell, arguments can be passed to a function when it is called. Inside the function body, the value of the parameter is obtained in the form of a $n, for example, $ $ for the first argument, and $ = for the second argument ...Examples of

Crontab let Linux execute shell scripts at timed intervals

Use crontab you can perform a specified time in the Shell script or a series of Linux command. For example, the system administrator schedules a backup task to run every dayEntry# crontab–eThis enables the edit mode to open the personal crontab

Problem solving in shell that only loops the first row when using while loop ssh

Recently writing a shell script, I would like to use a For loop to read the contents of the file, but found that every line in the file has a space, obviously with a for loop does not work, my intention is to read a row of the file content, so

Operation and maintenance experience sharing (vi)--crontab The problem of not executing shell scripts correctly (ii)

Operation and maintenance experience sharing as a topic, currently a total of 7 articles Operation and maintenance experience sharing (i)--Linux Shell's Chatterserver service control script Operation and maintenance experience Sharing

Total Pages: 541 1 .... 133 134 135 136 137 .... 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.