Creation of the Shell script menu

Create a text menu create a menu layout root@wl-ms-7673:/home/wl/Desktop/shell# cat-n test1.sh 1 #!/bin/bash 2 echo-e "\t\tmenu" 3 ECHO-E "1.\tdisplay disk Space" 4 echo-e "2.\tdisplay logged on user"

10-shell printf Command

In the previous section we learned about the Shell's echo command, which we'll learn from the Shell's other output command printf.The printf command mimics the printf () program in the C library.printf is defined by the POSIX standard, so scripting

Shell script description, shell script structure and execution, date command usage, variables in shell scripts

Shell Script IntroductionShell is a scripting language blog.lishiming.net (Amin blog, you can go inside to find the shell problem)You can use logical judgments, loops, and other syntaxFunctions can be customized to reduce duplication of codeThe

Signal processing in the shell

Reference: Signal processing practice in shell scripts the signal trap function of the Linux shell you must know the details in Unix, each type of event that can occur is described by an independent signal, each of which is a small positive integer,

8.10 Shell Special Symbol cut command 8.11 sort_wc_uniq command 8.12 tee_tr_split command 8.13 Shell special symbol

[[email protected] ~]# ls111 234 anaconda-ks.cfg Dir3 test5 Yum.log123 2.txt a.txt dir4 Testb.txt Learning Schedule1_hard.txt 2.txt.bak BB split_dir testc.txt1.txt 3.txt dir2 test4 Thinking_in_java (Chinese Version _ Fourth edition). pdf[[email

Shell scripting Learn (2) compare two digit sizes

Note: The comparison string in the shell can only be used = =, ,! =,-Z,-N. When comparing strings, be sure to add X (or a, B, etc.) to the end of the string, because if [$1x = = "AB" x] If there is no X, and "" ", this statement will be translated

Shell scripting exercises for the Linux shell scripts

1. Find the currently interactive user650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/00/CF/wKiom1mdh9rxWKWHAABNp7Z1LwU734.png "title=" Screenshot from 2017-08-23 21-48-49.png "alt=" Wkiom1mdh9rxwkwhaabnp7z1lwu734.png "/>650) this.width=6

Getting Started with Linux shell programming

From the programmer's point of view, the shell itself is a program written in C language, from the user's point of view, the shell is the user and the Linux operating system communication Bridge. The user can either enter command execution or use

What is Shell,shell basics, common shell commands, usage, tricks

Shell: Can batch processing, automation to complete a series of maintenance tasks, greatly reduce the burden of administrators! The shell is a special application that acts as a "command interpreter" between the operating system kernel and the user.

command-line options for parsing shell scripts using the getopts command

Transferred from: http://yejinxin.github.io/parse-shell-options-with-getopts-command/Standard UNIX commands generally offer a number of options, with the user providing specific options and parameters, in the form of a command line, as

Summary of common methods of bash shell scripting in System management

In the daily system management work, the need to write scripts to complete specific functions, writing shell scripts is a basic skill!In the process of writing, master some common skills and grammar can do most of the functions, that is, 2/8

Beginner's "Linux Programming" learning-shell Script

1. Understanding Shell Scriptshell Script is a "program" that uses the shell's function abbreviation, which uses plain text files to write some shell syntax and commands (including external commands) in it, with regular expressions, pipeline

Exit-shell exit Status

1. IntruductionExitmakeShell(script) to exit with a specified status value, Execute without parametersExitwhen, Shellor the script exits with the status value of the last execution command. Shellbefore exiting, Trapcan huntEXITsignal. 0indicates

Using Popen () to execute shell commands under Linux

Simply say the Popen () functionfunction definition#include * Popen (constcharconstchar *type); int pclose (FILE *stream);function Description  The Popen () function creates a child process by creating a pipe, calling fork (), and executes a shell

Awk of the Linux-shell script command

[Introduction to awk: ]awk can get some of the content from a single text, or format the text so that it is output in some way.[awk Workflow: ]awk will take the file line into memory and then segment the line (by default by Space or tab, $, $, $ .

Install zabbix-agent using shell scripts

[[Email protected] shell] # Cat zabbix. Sh #! /Bin/bash Set-x Host = 'hostname' Dir =/root Service iptables stop AZ () { Groupadd zabbix Useradd zabbix-G zabbix-S/sbin/nologin Tar-zxvf $ DIR/zabbix-1.8.5.tar.gz CD zabbix-1.8.5 ./Configure -- prefix

ADB shell dumpsys meminfo view application memory usage

ADB shell dumpsys meminfo The following information is displayed: Currently running services:Meminfo-------------------------------------------------------------------------------Dump of service meminfo:Applications memory usage (Kb ):Uptime: 5712383

Linux Shell special symbol learning Summary

Common special symbols in shell are listed as follows: #;,/\ 'string' |! $ {}$? $ * "String "***?: ^ $ # $ @ 'COMMAND '{} [] [[] () | & {XX, YY, ZZ ,...}~ ~ + ~ -& \ +-% =! = Output/input redirection >>>&> 2 <>>>& 2 # comments) this is almost a

Linux Shell date command pit (date 1 month ago strange phenomenon)

The first and last days of this month: Echo 'date -- Date "$1" + "% Y-% m-01 "'   Year = 'date-d "$1" + "% Y "'Month = 'date-d "$1" + "% m "'Last_day = 'cal $ month $ year | xargs | awk '{print $ NF }'' Echo $ year-$ month-$ last_day   Calculate the

Introduction to % CPU in the ps command in Linux Shell

In the ps command, % CPU refers to the percentage of CPU usage time of a process. What does it mean? The man manual of PS is explained as follows: CPU utilization of the Process in "##.. #" format. Currently, it is the CPU time used divided by the

Total Pages: 541 1 .... 47 48 49 50 51 .... 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.