BASH Shell Script Programming

/*************************************** ******************************* Author: Samson* Date: 08/01/2013 **************************************** ****************************/ BASH Shell script programming learning summary: Variable:(1)

Shell logon mode and corresponding configuration files

Refer to Linux Command, editor and shell programming (Tsinghua University Press) When shell is started, it will run the Startup File to initialize itself. The specific file to run depends on whether the shell is a login shell or a non-Login Shell

Shell programming Basics

Author: Leal Authorization license: Create sharing agreement GNU Free Documentation License Edited by: firehare, dbzhang800   We can use any text editor, such as gedit, kedit, emacs, VI, to write shell scripts. It must start

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

The stored procedure uses shell scripts to execute SQL files.

The requirement today is to write the creation of all tables to the storage process. After receiving the script for creating a table, it is silly. There are 60-70 tables, including stored procedures and views. How can this problem be solved.

Shell: ECHO does not display multiple spaces in the variable.

Transferred from: Feng yunzhi:Http://witmax.cn/shell-echo-spaces.html When the echo variable is in shell, only one space is printed in the variable, as shown below: 1 Sh-3.2$ TMP="A B d"2 Sh-3.2$ Echo $ TMP3 A B d The solution is to add double

Use of ADB shell and busybox

1. Install busybox Busybox is a single executable implementation of standard Linux tools. Busybox contains some simple tools, such as CAT and ECHO, and some larger and more complex tools, such as grep, find, mount, and telnet. Some people refer to

Bash basics and shell programming Basics

Bash Basics   About commands and command types Use the hash table for the command Bash to accelerate the next search. To add a frequently used command, use the hash cmdBash executes commands with the same name in the path in the following sequence:

Android intermediate: using Java code to execute shell commands

Java code execution shell command 20:48:20 Some system information in Android does not directly provide API interfaces for access. To obtain system information, we need to use shell commands to obtain information. In this case, we can execute

Shell arithmetic operation

(I = $ J + $ k ))  Equivalent to I = 'expr $ J + $ K'(I = $ J-$ k ))   Equivalent I = 'expr $ J-$ K'(I = $ J * $ k ))   Equivalent I = 'expr $ J \ * $ K'(I = $ J/$ k ))   Equivalent I = 'expr $ J/$ K' Let expressionsExecute one or more expressions. $

Shell knowledge point supplement (6)-exit/expr

1. Linux Command exit-description of the purpose of exiting the Current Shell The exit command is used to exit the current shell. In the shell script, you can terminate the execution of the current script. If you do not exit, you may continue to

Switch proxy's Automator-workflow shell script

A script developed for colleagues to quickly switch the environment of the home and Unit Tell application "system events" Set proxy_dialog to display dialog "proxy module (Ethernet version):" Buttons {"enable proxy Mode 1", "enable proxy Mode 2 ",

Process Control in Shell

1. If statement If the "if" expression is true, the part after then is executed:Toggle line numbers 1 If...; then2 ....3 Elif...; then4 ....5 else6 ....7 fi In most cases, you can use test commands to test conditions, such as comparing strings,

A classic and practical iptables shell script

#! /Bin/sh# Modprobe ipt_masquerade Modprobe ip_conntrack_ftp Modprobe ip_nat_ftp Iptables-F Iptables-T nat-F Iptables-x Iptables-T nat-x ########################### Input key################################### Iptables-P input drop Iptables-A input-

Linux automatic backup shell (using full backup and Incremental Backup policies)

Set in cron and execute at every Monday (full backup every Monday, Incremental backup for the rest of the time) # Vi backup. Sh Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#! /Bin/bash #

Shell determines whether a file exists

1. Shell checks whether a file or directory exists or has permissions 2 .#! /Bin/sh 3. 4. mypath = "/var/log/httpd /" 5. myfile = "/var/log/httpd/access. log" 6. 7. # Here, the-x parameter determines whether $ mypath exists and has executable

Linux shell prompt

PS1 = '[/[/033 [01; 32 m/]/h:/[/033 [01; 34 m/]/W/[/033 [00 m/]/$' A brief explanation:The useful information is as follows:PS1 = '[/h:/W]/$'/H display the current host name/W display the current directory/$ Prompt[] For beauty The result is as

The mysterious killer-shell.

If you want to know the source code of HDFS, you can read his javaeye from Brother Cai bin.  Sorry, I used the word "mysterious killer" because it really hurt me so much that I took a lot of energy to pick it up. Recently, when testing hadoop, The

Linux Bash Shell (19): String I/O -- read

This article is the seventh chapter of "Learning the bash Shell" 3rd Edition, "Input/Output and Command-Line Processing. Our goal is to read books thin. Echo and printf are both written. read is used for reading. The format is: ReadVar1 var2...

Shell programming syntax (1) ZT

In fact, the interactive interpretation and execution of user input commands as a command language is only one aspect of the Shell function, Shell can also be used for program design, it provides a variety of methods to define variables and

Total Pages: 541 1 .... 179 180 181 182 183 .... 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.