Shell script tracking and debugging

1. Shell Script debuggingUse the SH command to check the syntax of the shell and trace the execution steps. SH [-NVX] script.sh-n: Do not execute script, only check for syntax problem-V: Print script before execution-x: Print script to use2. Check

The basics of Shell programming [and the similarities and differences

First, Introduction[equivalent to test, which is the internal command of bash, the coreutils package for the Gnu/linux system usually takes/usr/bin/test and/usr/bin/[commands. If we don't specify the absolute path, we usually use Bash's own commands.

[Shell] Shell Common Special symbols

Meet Meaning && Command1 && command2: Command 1 returns True (Command return value $ = = 0), command 2 can be executed. Can be used for if judgment.CP 1.txt.. /&& echo "succes" #-->successCP 1.txt.. /&& rm-f. /1.txt && echo

Tips for the basics of Shell programming

Exit statusThe built-in command in bash does not create a new process, but it also has the exit status, usually with 0 to indicate that a success nonzero indicates a failure, although the built-in command does not create a new process, but there is

Shell break and Continue commands

In the loop, sometimes you need to force out of the loop when the loop end condition is not reached, like most programming languages, the shell also uses break and continue to jump out of the loop.Break commandThe break command allows you to jump

Shell array under Linux

The array in the shell is the same as other programming languages, considering that the shell is a weak type of scripting language that can be defined and used directly in command limeFor example:$a [1]= "Monday"$echo ${a[1]}Monday$Note that here

Collection of shell scripts

#1Sed-I's/Disabled = true/Disabled = false/'/etc/fdfs/storage. conf#2Sed-I's/base_path = \/home \/yuqing \/fastdfs/base_path = \/fdfs \/storage/'/etc/fdfs/storage. conf#3Echo "Enter tracker_ip :"Read tracker_ipEcho "$ tracker_ip"Sed-I

Spark series (ii) spark shell operations and detailed descriptions

Parallelize)   // Load data 1 ~ 10 Val num = SC. parallelize (1 to 10) // Multiply each data item by 2. Note that _ * 2 is recorded as a function (fun) Val doublenum = num. Map (_ * 2) // Memory cache data Doublenum. cache () // Filter data.

A simple shell removal instance (DEX)

I just finished my work and just analyzed a reinforced game. I remembered that the analysis process was not found in the last post, and I recorded a video. Here I will simply add it.For the new version of this shell, there are also tutorials on the

A simple shell script with menu options

This is a simple shell script, which contains a lot of shell script writing skills, although the script is compiled from other video tutorials, however, it has paved the way for me to write shell scripts in the future. #!/bin/bash############## main 

Shell variable details

1 shell variable BasicsShell variables are very "weak" variables. By default, a variable stores a string, and shell does not care about the meaning of the string. Therefore, to perform mathematical operations, you must use commands such as let,

Learning bash notes-debugging Shell programs

In shell, the simplest debugging assistant outputs the echo statement. Many echo statements can be put into the code for debugging, but it takes enough time to locate The information to view. You may need to output a lot to find the information you

How to call another script in shell script

Developed on the Linux platform, another script file is often executed on the console. The following methods are frequently used:./My. ShOrSource my. ShOr. My. Sh; What are the differences between the three methods? Let's take a look at how to call

Shell: redirection of Input and Output

Understanding: By default, Linux commands obtain input from the standard input device (stdin) and output the result to the standard output device (stdout) for display. Generally, the standard input device is the keyboard, and the standard output

Shell text filtering programming (2): the basis of awk

[Copyright statement: reprinted. Please retain the Source: blog.csdn.net/gentleliu. Mail: shallnew at 163 dot com] The grep command is used to obtain the line information that complies with the rules. This section describes how to use awk to obtain

Shell error: unary operator expected"

I 've been learning Perl, and shell has forgotten about it. Today I wrote a small script to determine the operation when the second variable of the script is not equal to a certain string. If [$? -EQ 0] & [$2! = "WP"] Then : # Omitted Fi If the

Learning shell script programming (Phase 1) _ parameters used in Shell programs

Location parameters Internal Parameters Just as the LS command can accept directories and other parameters as its parameters, parameters can also be used in shell programming. Parameters in Shell programs include location parameters and internal

How to use shell trusted CT

Don Libes, author of objective CT, made the following definition for objective CT when it was written in 1990: automated CT is a software suite for automatic interaction (Automated CT [is a] software suite for automatic interactive tools ). The

[Shell] example of if, for, while flow statement and integer string comparison

[Shell] example of if, for, while flow statement and integer string comparison Preface: In fact, Shell is a command interpreter that explains the commands entered by the user and sends them to the kernel. In addition, Shell has its own programming

Linux Shell script monitors the running status of WAS (WebSphere Application Server)

Linux Shell script monitors the running status of WAS (WebSphere Application Server)Principle: You can call the WAS script wsadmin. sh to obtain the instance status.Operating system version: [Root] # head-1/etc/redhat-releaseRed Hat

Total Pages: 541 1 .... 157 158 159 160 161 .... 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.