2017 the latest enterprise face Test shell (iv)

2017 the latest enterprise face Test shell (iv)First, the draw script (1) requires the following:1, write a script execution, enter the name, generate a random number 01-99 between the number;2, after entering the name, the screen output information,

2017 the latest enterprise face Test Shell (ii)

2017 the latest enterprise face Test Shell (ii)Exercise 1: write a shell script that lists the IP of the 192.169.5.0/24 network segment online. (Locate the active IP)Requirements are as follows:1. The online IP and the online IP are placed in two

Shell script to get basic information about Linux server

Test Run Environment: SLES12SP2#!/bin/bash#系统名称;os_type=$ (Uname-o | awk ' {print ' | ' +} ')#系统位数; 32/64os_bit=$ (uname-m | awk ' {print ' | ' +} ')#内核发型版本kernal_version=$ (uname-r | awk ' {print ' | ' +} ')#系统版本信息sys_info=$ (cat/etc/issue | awk ' {

Shell and VI Editor

1.1 What is a shell? in computer science, Shell commonly known as Shell , used to distinguish from Kernel ( nucleus ), refers to the "User interface " software ( command parser ). It is similar to DOS command and later cmd.exe. It receives the

Linux shell online text editing sed

sed command file editingsed is a text editing command that reads file data through a terminal into a buffer, then edits text through SED, and in the output to the specified file, sed is a stream editor, which is a very useful tool in text processing,

Parameter passing of the shell

We can pass parameters to the script when executing the Shell script, and the format of the parameters obtained in the script is:$n. n represents a number, 1 is the first argument to execute the script, 2 is the second argument to execute the script,

Shell script Add or remove user and command use method

Shell Requirements: Write a scriptOne, add 10 users user1 to User10, password with the user name, if the user exists, but requires only the user does not exist in the case can be added, in the format of/useradd.shSolution ideas: 1. Use the FOR Loop

Shell script Add or remove user and command use method

Shell Requirements: Write a scriptOne, add 10 users user1 to User10, password with the user name, if the user exists, but requires only the user does not exist in the case can be added, in the format of/useradd.shSolution ideas: 1. Use the FOR Loop

Shell scripting correlation, floating point, looping

Put a bunch of commands in the script into executable script execution;Script, file name is. SH, get hostname host nameSystem variables:ENV: View System VariablesSet: All variables can be printed with grep andExport path: Define Global variables

Shell Process Control--loop statement

#!/bin/bash### for loop, number segment formEcho 'for loop, number segment form' forIinch{1..3} Do Echo$i Done### forloop, double-brace formEcho 'for loop, double bracket form' for((i=1;i5; i++)) Do Echo$RANDOM Done### for seqEcho 'for loop,

Getting Started with Shell scripting--on

Hello everyone! Today's share is the basic knowledge of some shell scripts, chapter for the introduction of the content of this article are: variables (classification, assignment, query, reference), arithmetic operation implementation.Introduction

HBase Common shell commands

Transferred from: http://my.oschina.net/u/189445/blog/595232 HBase shell command Describe Alter Modify Column family (family) mode Count Number of rows in the statistics table

Bash Shell parsing path Get file name and folder name

Preface or Today write a self-starter packaging script. Used to get the last file name from the path name. Here is a record of the implementation process.Of course, in the end I will also give the official approach. (PS: Very embarrassing, realized

Linux-bash shell function; built-in command type

Command editing ability (history):One of the great features of Bash is that "he can remember the commands he used!""This is a really great feature!" Because I just have to press the "up and Down" button in the command line to find the front/rear

2.Linux Shell function

Order of 1.Shell Search commandsWhen the shell executes the command, it does not directly look in the path path, but instead looks for the command location in a fixed order. The search order is as follows.1. Aliases. Even if you create a command

Shell String Segmentation

Syntax 1:substring=${string:start:len}The subscript of string starts with 0, with start, but the Len character is truncated and assigned to substring1 #!/bin/bash2 #substr =${string: Start:len}3 str=" 123456789 " 4 substr=${str:3:3}5echo $substr6 7

To provide the old boy learn Linux OPS Shell programming in the fifth chapter of the source code

The fourth chapter is about the shell variable knowledge advanced and practice;The fifth chapter is about the numerical calculation practice of variables;The annex includes the source code, please download.The two chapters should pay attention to

Shell Date Command Detailed

  Format: Date [options] ... [+ format]Option Description:-D,--date= string displays the time described by the specified stringFormat Description:Example 1:#!/bin/bash##1. Gets the current system time yyyy-mm-DD HH:MM:SSv_time_eq=`Date "+%f%T"'

Shell Scripting Normalization, standardization

1. Write more comments in the script             This is a recommended practice that can be applied not only in shell scripts, but also in all other types of programming.              commenting in a script can help you or others to read your script

Shell--9, Shell functions

The Linux shell can be user-defined functions and can be called casually in shell scripts.The functions in the shell are defined in the following format:[Function] funname [()]{action; [return int;]}Description 1, can be with function fun ()

Total Pages: 541 1 .... 186 187 188 189 190 .... 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.