Learn Shell script Diary

linux,shell2015-02-07    1. Scheduled tasks: Corntab-e writing Scheduled Tasks     CORNTAB-L viewing Scheduled tasks       Corntab-r Clear all Scheduled Tasks            If you want to clear a scheduled task, you can go to the edit page of the

Split string in Shell

Recently the system has learned shell programming.See an example in the book, very dick. I thought about it before, but I didn't get the result.I believe that the students also guessed this example, is a line of string splitting. Students can try it

Shell determines whether the input is valid IP and letter

Tag: Shell Determines whether the input is valid IP shell determines whether the input is a letter1. Purpose of demandRecently in the study of ansible automation tools, in the host table (/etc/ansible/hosts) Add Management node information, a few to

The entry of the shell script

shell script parameters can be as many as possible, but only the first 9 can be accessed, using the shift command can change this limit. The parameter starts at the first and ends at the Nineth one. $ A program name$n Nth parameter value, n=1..9$*

Initial knowledge of shell scripts

#! /bin/bash (the declaration of theLinux scripting environment is the interpreter, which is bash, under the bin directory in the root directory )Definition and assignment of variables:Format: Variable name = variable value ( No need to declare

Shell Script Learning 11 Shell Comment

Lines that begin with "#" are comments, which are ignored by the interpreter.There is no multiline comment in sh, only one # is added to each line. Can only be like this: #-------------------------------------------- # This is a

The cut of shell programming

Cut to the Unit of action in the file,according to the conditions you set, cut out some of the contents of the print. Output to standard output and will not be saved to any fileThe-B range determines the range based on the byte-C range according to

Restarting the Tomcat shell

#!/bin/bash#1, determine if the service is available 2, do not use restart TOMCAT#*/30 * * * */home/wsm/restart.sh >>/home/wsm/restart.log# Stop tomcatfunction Killtomcat () {pid= ' ps-ef | grep "/home/wsm/bin/tomcat" | grep-v grep | awk ' {print $}

First blog with the first shell script written

Work fast two years, to Cnblogs also nearly two years, high-touch, but also at least into the program Ape Army.Finally opened the blog (do not laugh, belly ink is too little, are looking at the study of the Great God).I don't know what to

Linux Experiment--shell Programming

Reprint Please specify: Http://blog.csdn.net/wujysh1. View the values of the environment variables defined by the user shell under the current system.2. Define the value of the variable AK to 200 and display it on the screen.3. Define the value of

Awk writes shell distribution scripts

When you use Hadoop or deploy Hadoop, you often encounter situations where you want to copy files to other machines, but if the individual writes, it happens that the cluster is large and exhausting, and now uses an awk to write shell scripts that

HBase Shell Common Commands

HBase Shell Common Commands:Name-------command expression creates table-------create ' table name ', ' column name 1 ', ' Column Name 2 ', ' Column name n ' Add record-------put ' table name ', ' Row name ', ' Column name: ', ' value ' view record---

Shell Foundation and Process Control statements case judgment

The Last Post describes the while statement, while the basic use and the dead loop and the file test method, and so on, or that sentence if you want to master all the need to practice many times.This blog introduces the case statement, the

Location variables in the Linux shell

For the location variables in the Linux shell, I have always been unable to spit out and swallow, every time I see do not understand, do not understand the Baidu Google, read and forget, is really chronic pharyngitis ah. Now seriously think about it

Some summary of shell script usage

(1), the CSH script can call Bash's script, and vice versa.(2). How to invoke variables and functions defined in other scripts.(3). The variable defined, which defaults to a global variable. Local variables need to be specified locally to declare

2 Simple shell scripts (if,while,case statements)

Experimental requirements:1. Write a script called sum.sh, prompting the user to enter an integer less than 100, and to calculate all integers from 1 to that number2. Write a script called tar.sh, which is used to extract compressed files in. tar.gz

Shell sort (reduce incremental sort)

Core idea: First determine an element interval number gap, and then the sequence of participating in the order of this interval from the beginning of the 1th element into a number of sub-sequences, that is, all positions spaced gap is considered as

Shell Array notes.

1), the definition of the array (self-dividing):Static array= (123)Dynamic array array= ($ (command))Example:array= ($ (LS)) echo ${bb[@]} color01.sh color.sh ip.sh touch.sh tou.sh user.sh while01.sh while_02.sh2), display the contents of the

Gzexe encrypts shell scripts 01, gzexeshell

Gzexe encrypts shell scripts 01, gzexeshell Gzexe encrypts shell scripts 01 I. Introduction Most of the time, our script involves some private information, such as the user name, password, or other important information. We use some encryption

Summary of using shell scripts

Summary of using shell scripts (1) The csh script can call the bash script, and vice versa. (2). How to call variables and functions defined in other scripts. (3). Defined variables. The default value is global variables. You must specify local

Total Pages: 541 1 .... 481 482 483 484 485 .... 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.