Shell script learning notes (1)-prerequisites

Prerequisites Check script Syntax: Bash-V test. Sh Jack Do not run. view onlyCode: Bash-n test. Sh Trace execution: Bash-X test. Sh Force variables to be declared first and then use: shopt-S-O nounset When executing the script with SH test. Sh,

Shell programming needs to know

Recently, shell has been used. It is very simple and has no logic. I wrote it here just to help myself remember it. It's just a messy note. I hope this will help you. Please advise me more. 1 If else If [$ #-lt 5]; then HelpExit 1 Else Do

Common shell skills

Let's take a look at some common shell tips. CTRL + u Delete the cursor to the beginning of the current row CTRL + k Delete the cursor position to the end of the current row CTRL + a move the cursor to the beginning of the current row CTRL + e

Using NET: SSH2 shell Method

First way: $ Chan2 = $ SSH2 -> Channel (); $ Chan2 -> Blocking ( 0 ); Print $ Chan2 " Tail-5/var/log/authlog \ n " ; Print " ** $ _ " While $ Chan2 > ; Second way: # Shell use My $ Chan2 =

Linux Shell array length calculation, modification, cyclic output, and other operations

From: http://blog.csdn.net/snrqtdhuqf/article/details/7242309 In shell, there are two ways to assign values to array variables: (1) name = (value1... valuen) The subscript starts from 0. (2) name [Index] = Value Example: #! /Bin/sh

Shell script-check whether the file exists

From: http:// OS .51cto.com/art/200912/165922.htm Write a script to check whether a file exists. If so, output its details. If not, the system prompts that the output file does not exist. Before providing this script, let's take a look at the

Shell scripts monitor whether a process is running

Write a shell script to check whether a process is running 1 #! /Bin/ Sh 2 3 Cmd = Pgrep 4 # Process name 5 Pproc = Test 6 # Loop, to keep the script running for monitoring 7 While : 8 Do 9 If [-N " '$ Cmd $ pproc' " ] 10

Close the simple shell of a process

Eclipse on Mac often needs to manually close the Java Process, which is a little troublesome. Write a simple shell in. bash_profile and use the port number to close the process.Lsof-Ti: 9001.Then $ source. bash_profile can use the killps command. 

Passing parameters to triggers in Javascript using the shell packaging method

Passing parameters to triggers in Javascript using the shell packaging method Reference address: http://callof.net/Site/pView.Asp? Id = 1270 In a well-structured web page, not only must the

Teach you three methods of automatic Linux Shell Interaction

Do you know about Linux? Are you an application of Linux? If you want to learn about Linux, you may encounter the problem of automatic Linux Shell interaction. Here we will introduce how to solve the problem of automatic Linux Shell interaction.

Wscript. Shell object details !! (2)

Folder, Start Menu folder, and personal document folder. SyntaxWshshell. specialfolders = obw.shspecialfolders Example'This code fragment shows how to access the Desktop FolderSet wshshell = wscript. Createobject ("wscript. Shell ")Msgbox "your

Discussion on Linux Shell's automatic FTP operations

Do not add the parameter-V. Otherwise, you will test it on Linux. VI autoftp. Sh The content is as follows: FTP-n-v-I Linux Command (used to set file permissions) umask 022 The preceding command indicates that the umask value in Linux is 022.

Write shell scripts (2)

SELF: http://lulu87.blog.51cto.com/1244696/373771 Case 1: use shell scripts for System Management Lab Environment The company is equipped with a Linux server for technical training at the Branch Office. Therefore, you need to add user accounts

Usage of GNU Emacs by non-programmers ...... Can the shell mode 11th set window be undo ???

This is my usual work desktop. Or this is the Emacs I usually work on. To see the big picture, click here The above figure shows a 4-window working mode that many people like very much. This mode is widely used by shell users. I once liked this

Usage of GNU Emacs by non-programmers ...... Shell mode 13th sets to return my kill-ring back to me

Kill-ring is definitely a wonderful design in Emacs. Many times I hate to add the clipboard of X WindowKill-ring. However, when I enter M-yThere will always be a lot of boring things in it. I may never post those things, because they are not

Shell script color display

Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/ Color is selected by adding a special sequence-basically a numerical value between "/E [" and "m. If more than one numeric code is specified, separate them with semicolons.Echo-e "/E [31; 40 m"The

Shell Command learning notes

Shell Command learning notes 1. tr replacement characters Simple Example: tr 'A' a' Replace A with. The tr command can only be used to replace a single character. If it is written: Tr 'abc' It means to replace the characters A, B, and C with the

DNS, Shanghai peanut shell DNS resolution error, had to use another.

Beijing 10.2.1.38 202.106.196.115 202.106.0.20 Shanghai 10.95.0.3 202.96.199.20.202.96.0.20. Tianjin 10.10.64.68 202.99.96.68 Guangdong 202.96.128.68 202.96.128.110 Henan 10.68.160.3 10.68.32.3 202.102.227.68 202.102.245.12 Guangxi 10.137.128.40 202

Shell script learning notes (6)-redirection and traps

Redirection   File Code: 0, 1, 2 ,... output Most of the conversion semantics cannot be used independently and must be used together with the Bash command.   Operation file: Fd <> FileFd file code, available for reading and writing Fd Close input

Executable of the host type written in shell scripts

Recently, I am working on a project, because some functions are implemented using ORACLE package, but it is very good to use UNIX scripts, therefore, an executable host request is mounted on the AP to solve this problem. I think this is a little

Total Pages: 541 1 .... 365 366 367 368 369 .... 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.