Generate random number in Shell

The original article was written at 18:29:20,. NetEase blog has been deleted.To generate a random number in shell, you can call $ random in Bash to reference an introduction to random.Each time this is referenced, a random integer between 0 and 32767

Shell scripts control jar startup and stop

#! /Bin/sh # Startup Method Start (){ Java-xms128m-xmx2048m-jar test1.jar5> Log. log & Java-xms128m-xmx2048m-jar test2.jar5> Log. log & Tail-F result. Log } # Stop Method Stop (){ PS-Ef | grep test | awk'{Print $2 }'

Shell if usage

-B. returns true if the file exists and is a block file.-C: returns true if the file exists and is a character file.-D. If pathname exists and is a directory, true is returned.-E: returns true if the file or directory specified by pathname exists.-F

Introduction to some special symbols in Shell

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

Use popen () in Linux to execute shell commands

Document directory Function Definition Return Value To put it simply, the popen () functionFunction Definition #include FILE * popen(const char *command , const char *type );int pclose(FILE *stream);Function Description The popen () function

Simple shell sorting and statistics.

During the bug quality analysis, the word segmentation should be sorted and de-duplicated, so we thought of sort and uniq. It is very convenient to call shell through python. #-*-Coding: UTF-8 -*-Import OSImport sysDef cws_statistics (flag, afile,

BASH Shell (I)-bash shell function Introduction

In the bash shell series, when talking about variables, we first talk about the functions and modifications of environment variables, and then continue to talk about the use of historical commands. Next, let's talk about the important concept of

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 3rd set command line editing

Bash brings command line editing, and countless people are blessed. Yes. This is the case. The command line editing is really a good friend in our daily work. Can you still imagine how it feels to work in an ancient Bourne shell without command line

Shell script-Batch rename

If you have a small requirement at work, you need to rename a series of files. The original format is string_1.obj. Now you want to change the number in the file name to a fixed length. If the number is less than the number of digits, it is changed

Shell script: Merge rows.

Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/ There is a text:2006ChinaSichuan042834 1 2 3042835 4 5 6042836 7 8 92007ChinaChongqing042837 1 2 3042838 4 5 6042839 7 8 9............To merge042834 1 2 3 2006 Sichuan, China042835 4 5 6 2006

Shell script: how to use shell environment variables in awk

Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/ I. "'$ var '"In this way, you do not need to change the habit of using the awk program. It is a common method used by foreigners. For example:Var = "test" awk 'in in {print "'$ var '"}'In this

Shell script: a script that calculates the memory and usage of the local machine.

Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/ #! /Bin/bash #################################### ###################################### Author: futuristic daemon # created time: Thu 19 Nov 2009 10:57:15 pm CST # file name: checkmem. sh #

Ubuntu9.04 shell programming [: 10: Y: Unexpected Operator

According to the shell programming of laruence's private dish, there is an inexplicable problem.For example: # Test if else   Read-P "input y/n? : "YN If [$ YN = "Y"]; then Echo "continue ;"Elif [$ YN = "N"]; thenEcho "break ;"ElseEcho "PLS

Shell File Operations)

Http://blog.chinaunix.net/u/29289/showart_407859.html A read operation can assign values to multiple variables at a time, but only one row can be read at a time. For example: #! /Bin/bash ifs =: Read aa bb cc

Linux Shell script Quick Start

In this article, through the summary of variable declaration, loop statements, condition judgment, and data superposition in shell scripts, most scripts of Linux daily management can be solved. 1. Variable declaration: Is a weak language, with name =

Shift usage in shell programming

Location parameters can be used shiftCommand left shift. For example shift 3Indicates the original $4Change $1, The original $5Change $2And so on. $1, $2, $3Discard, $0Do not move. Without Parameters shiftThe command is equivalent shift 1. Very

Shell script test site

Document directory Use the top script to retrieve the CPU of a process: Add User: IP address access statistics: Calculate the sum of 2 numbers Text Analysis File Sorting Print the swap partition size of the Local Machine Output the time

Prerequisites for getting started with Shell

1. Create and run Shell programs What is a shell program? Simply put, a shell program is a file containing several lines of shell or Linux commands. Like programming in advanced languages, writing a shell program requires a text editor, such as VI.

Mount: Telnet session "shell process may not have been launched" (solution)

The issue is that in w2k3 Telnet Server(Tlntsvr.exe) no longer runs as LocalSystem and needs to run the CMD Process(Cmd.exe) usingCredentials of the logged in user. If Secondary Logon Service is notStarted, TelnetServer process cannot start the CMD

Total Pages: 541 1 .... 490 491 492 493 494 .... 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.