Debugging Techniques for Shell scripts

The essential point in programming is debugging, Shell script with its powerful function is desirable, of course, its powerful is not only embodied in the language of the implementation function, more powerful is its debugging function, below, I

About the difference between a login shell and a non-logon shell

ftp

What is login Shell: Login shell can be used by user login, such as/bin/bash,/bin/sh,/bin/csh ... The general Linux Default User shell is bash, which means you can log in and write commands. Non-logon shell: The classic/bin/nologin is a non-login

Simple shell Multi-process (running in the background)

These two days, because the work needs to do some of the process of work, look at some of the online examples, mostly through the way of pipeline files to achieve, and then think about it without so much trouble ... The following is a simple

Linux CentOS Shell display-bash-4.1$ does not display user name path

Linux CentOS Shell display-bash-4.1$ does not display the user name path solution Problem Description: CentOS A new user, log in after the information of the shell script is as follows: Rather than the combination of username@hostname we

Linux shell gets SSH port number method

Lattice, as follows: The code is as follows [root@myvps1697 201407]# netstat-ntpl|grep sshd|grep-v grep |awk-f: ' {print $} ' In order to solve the problem of space, the 3 of my group have asked all the time, now I know how powerful people, a lot

CPU idle rate plug-ins developed using the shell

#!/bin/bash #=============================================== # AUTHOR:JC # Email : jiechao2013@gmail.com # changelog:2013.5.4 # Description:check the Cpu-utili Zation rate #=============================================== state_ok=0 state_warning=1

Linux/unix shell arguments to SQL scripts

In the process of database operation, the Shell script provides great convenience for operation and maintenance. A shell script parameter passed as a variable to SQL and a SQL script is one of the scenarios that DBAs often encounter. This article

Use the shell to determine whether a user exists (the user name is passed by parameter)

Write a script: 1. Use function to realize: To determine whether a user exists, the user name passed through the parameters; If present, the shell and UID of this user are displayed If it does not exist, it is said that the user does not exist;

AIX System Shell Programming Basics

What is a shell? The Shell is an interface between the operating system and the user that interprets the commands the user emits, launches the application, and manages the user data with system features. The shell can run multiple processes

Shell extensions: Customizing context Menus

If you need to get the full path of a selected file, little brother often mechanically copied the path in the shell window, then copied the file name and spelled it after the path. Sometimes the file path is copied for use by the program, which

Use shell script to automatically empty a hard disk to create and format

Job 3: Requirements are as follows: Write a script: 1, create a function, you can accept a disk device path (such as/DEV/SDB) as a parameter, before really start the next step to remind users of the risk, and let the user choose whether to

Linux uses Shell search to find text in several ways to share

The size of the log is very large, the server is generally Linux, HP, AIX, and so on, every time the download back to the trouble of the deadly, in the open source China to see the following content, very practical. 1. Use the Find and Xargs

Loop of shell scripts: repeating commands

Loop of shell scripts: repeating commands1.for CycleGrammar:For variable name in variable Value listDoCommandDoneFor based on the contents of the variable Value list, executes the command repeatedly until all the contents of the Variable Value

Shell Learning Notes Collation (ii)

Special characters:#! Sign of the beginning; Delimiters with multiple commands together[Email protected] log]# echo A;echo b;echo CABC. Multiple functions:1. Equivalent to the source command2. As part of the file name (hide filename) (use ls-a to

Shell Basics (i)

Shell Basics (i)* represents 0 or more arbitrary characters? represents an arbitrary character# Comment symbol, comment description meaning, that is, the content behind the # Linux ignored, or in the shell script to explain the symbol, explain the

Shell some methods

String interception from the original address: http://www.jb51.net/article/56563.htmOne: string interceptionThere are VAR variables:var=http://www.aaa.com/123.htm1. # Intercept, delete the left character, leave the right character.echo ${var#*//}Www.

Get the time of the previous day and the use of the Shell's ${!3} and eval

Example 1:[email protected] opt]# cat a.sh #!/bin/bashsource/opt/b.txtaa=${!1}echo $AA [[email protected] opt]# cat B.txt Abc=1[[em AIL protected] opt]# sh a.sh ABC1Example 2:[email protected] opt]# cat a.sh #!/bin/basha=1b=aecho ${b}echo ${!b}eval

Package shell scripts into RPM packages

The next best thing to do on a virtual machine: Docker is the most convenient1. Installing RpmbuildYum-y Install Rpmbuild rpmdevtools-y2. Generate a package pathWith Rpmdev-setuptree, a Rpmbuild folder is automatically generated in the user's home

Comparison of if judgments of the shell

The IF function in the shell is beyond doubt that every 80% of the shells will be applied to if judgment, then as a novice I should be the whole, I heard a morning class today, and then the morning's things summed up a script, and then to the people

Deletion of variable contents in shell, substitution

Delete ${varname#strmatch}//Match the Strmatch from scratch in varname and then remove the position from the beginning to the first match ${varname# #strMatch}//Match the Strmatch from scratch in varname and then delete the position

Total Pages: 541 1 .... 404 405 406 407 408 .... 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.