Using Sqlplus in shell and debugging related

Five, for security requirements each execution of the shell manually entered the password$ VI test5.sh#!/bin/bashEcho-n "Enter password for u_test:"Read PASSWDSqlplus-s/nolog Conn u_test/$PASSWDSELECT * from tab;ExitEof$ chmod +x

One of the Linux--shell script notes.

Shell Scripts (1)a Shell script is a special application that receives the operation commands entered by the user and interprets them, passes the actions that need to be performed to the kernel execution, and outputs the execution results. You can

Linux Common shell commands

1, mkdir newdir: New directory2. Touch filename: New file3. Vi/vim filename: Edit file4. grep [-ACIVN] [-A] [-b] [--color=auto] ' Search string | | Regular expression ' filename : A matching row was found from the file and displayed-A binary file

Linux Learning Notes--shell Basics (eight)

+++++++++++++++++++++++++ +++++shell Foundation +++++++++++++++++++++++++++++++1. Shell overviewShell definition:The Shell is a command-line interpreter that provides users with an interface system-level program that sends a request to the Linux

Linux Learning Note--shell Programming (ix)

+++++++++++++++++++++++++ +++++shell Programming +++++++++++++++++++++++++++++++1. Basic Regular Expressionsregular expressions and wildcard characters:regular expressions are used to match conditional strings in a file, Regex contains matches, grep

The actual application of the Linux/shell command--View port occupancy

The Linux/shell command is primarily intended to address:1, check whether a port is occupied;2, check which process is occupied by a port;3. See which ports a process occupies;For example, my Tomcat failed to start, the log display port is occupied,

Creation and execution of Linux shell scripts

 Scripting is essential when you are doing Linux testing. Using Linux recently, I felt tired of hitting the keyboard too often, so I thought of the shell script. You can write too many commands into a script so that you can eliminate the time you

Linux Shell Utility Small instance

Determines whether the current user is the root administrator, and if so, executes the tar to perform a backup of the/etc/directory.#!/bin/bash# IF Current user was root then backup the/etcIf ["$ (id-u)"-eq 0];thenTar-czf/root/etc.tar.gz/etc

Linux Shell Advanced Batch processing

There is a ' batch ' file in DOS that writes multiple commands into a batch called. bat.In Linux, it can also be done, and more powerful, I write batch processing is in Ubuntu 12.04 LTSAll I have to do is move the pictures on the USB drive to the

Shell kill Process

The safest way to kill a processThe kill command is used without a modifier or a flag.  First, use the PS-Ef command to determine the PID of the process to be killed, and then enter the following command:   # Kill-PID   Note: Standard kill

Shell condition judgment

Traditional if statements -- use conditional expressions as if conditionsIf [conditional expression]ThenCommandCommandCommandElseCommandCommandFiConditional expressionsFile expressionIf [-F file] If the file existsIf [-d...] If the directory

Simple string operations in Shell

In shell programming, some string variables are often processed. For example, commands such as awk, expr, sed, and TR are often used to calculate length, intercept substring, and replace character. Next we will introduce a simple string processing

[Shell] Shell functions

Functions allow us to divide a complex function into several modules, so that the program structure is clearer and the code reuse rate is higher. Like other programming languages, shell also supports functions. Shell functions must be defined before

IFS in Shell

1. Introduction to IFS The shell script has an internal domain separator called ifs (internal field seprator. The complete definition is the shell uses the value stored in IFS, which is the space, tab, and newline characters by default, to delimit

Shell Script Parameters

In Linux, shell variables $ #, [email protected], $0, $1, $2 are interpreted as follows:Variable description:$Shell PID (processid)$!PID of the background process last run by Shell$?End code of the last command (return value)$-Flag overview set by

Shell Logging Method

Linux logging method:Tee-a aa. log #-A indicates appendGrep "fdongdfd" missiles 2> BB. log error output to BB. LogCat aa.txt bb.txt 1> biaozhun.txt 2> cuowu.txt standard output to biaozhun.txt error output to cuowu.txtCat aa.txt bb.txt> error.txt 2>

Nginx scheduled switch log (Shell)

1. clearnginxlog. Sh   #! /Bin/bash # Run at 2: 00 am every Nginx_pid = "/run/nginx. PID" Logs_path = "/opt/log/nginx" Logs_date = "$ (date-d" yesterday "+" % Y % m % d ") _ 'date + % Y % m % d % H % m % S '" MV $ {logs_path}/access. Log $

String truncation method in shell programming

String truncation method in shell programming: 1. the GNU Linux Shell intercepts the first eight characters of the character variable by using the following methods: 1. expr substr "$ A" 1 8 2. Echo $ A | awk '{print substr (, 1, 8 )}' 3. Echo $ A |

Start and Stop the shell script after openvswitch 2.1.2 is installed.

After openvswitch 2.1.2 is installed, it is often possible to start and stop. To avoid repeating the script to start and stop the terminal code, it is best to write it in a different script to facilitate the next call. The premise is that

[Shell] judge the current user

[Shell] judge the current user Determines whether the current user is root. If the user is a root user, if not #!/bin/bash#title: testus.sh#author: orangleliu#date: 2014-08-09#desc: get current user, if it is root user, tell us it is super user or

Total Pages: 541 1 .... 395 396 397 398 399 .... 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.