what in shell

Alibabacloud.com offers a wide variety of articles about what in shell, easily find your what in shell information here online.

Export and Source,bash in shell scripts

1.export commandThe Linux Export command is used to set or display environment variables.When executing a program in the shell, the shell provides a set of environment variables. Export can add, modify, or delete environment variables for use by

Considerations for using SSH-free remote command execution in a loop in Shell programming

Prerequisite: Configure your own machine ssh password-free login#!/bin/bashCat list1234EODWhile Read lineDoif SSH [email protected] "test-f/tmp/a.sh"; Then #配置了免密登录, no password is entered hereecho "$line file exist."Elseecho "$line file not exist."

In-Shell date operations

1. date-d operationDate +"%y%m%d" -D "+ndays" #今天的后n天日期 Date +"%y%m%d" -D "-ndays" #今天的前n天日期2. Common Date format outputDate+"%F"#输出: -- .- ,Date+"%d"#输出: ./ ,/ ADate+"%y%m%d%h:%m:%s"#输出:20120608 Geneva: the: -Date+"%y%m%d"#输出:2

Floating-point calculation in shell scripts

Bash Digital Computing--Digital processing power is critical for any programming language, but for bash shell scripts, this ability is poor, even if the form of Expr command and $[] can only be used for integer operations, the operation of

Subtraction operation of time and date in shell

First, let's start by saying what the shell timestamp is:The number of seconds since January 1, 1970 (00:00:00 utc/gmt). It is also known as the Unix timestamp (Unix timestam, Unix epoch, POSIX time, Unix timestamp) is the number of seconds that

Two Methods for calling/referencing/containing another script file in Shell

Two Methods for calling/referencing/containing another script file in Shell Script first (test example 1) 1 #! /Bin/bash 2 Echo 'Your are in first file' Q) is another script file called in the current script file? Method 1: Use source

Cainiao help: How to call other software in shell

Cainiao help: How to call other software in shell-Linux general technology-Linux programming and kernel information, the following is a detailed description. This is my own small program. uvfit is a task of the miriad software. It is executed with

Simple array usage and examples in shell programming

Origin: in the shell programming teaching conducted by old boys in Linux training, many well-experienced netizens and students are still confused about arrays. The following is a small example of array usage, hope to help you. In fact, the shell

Get the current IP address in Shell

Reference address: The information returned by ifconfig includes the IP address, but it is troublesome to obtain the current IP address in shell. Obtain Method The formats of ifconfig returned information vary in different systems:[1] Linux:

Loop statement instance in Shell

1. For Loop statementsBasic for loop of instance 1.1 #! /Bin/bash For X in one two three fourDoEcho number $ xDone  Note: A "for" loop always receives a certain type of word list after the "in" statement. In this example, four English words are

Definition in Shell

Tag: Shell In Shell, some symbols are processed differently under different definitions. There are three main methods to define them: (1) single quotes (2) double quotation marks (3) reverse quotation marks Double quotation marks and single

Why does the while statement in Shell only loop once?

1. Event Description: 1 ,#! /Bin/bash Cat ../ip.txt | while read line Do Echo $ line SSH $ line "ls" Done The result is recycled once and then exited. The reason is that while uses the redirection mechanism. All the information in the file is read

Detailed explanation of grep COMMANDS IN SHELL

Use 'grep' to search for text files If you want to find a string in several text files, you can use the 'grep' command. 'Grep' searches for the specified string in the text. For example, if you are searching for a file with the string 'Magic 'in the'

Processing of command line options and parameters in Shell

In Bash, you can use the following three methods to process command lines:ParametersEach method has its own application scenario.1. perform direct processing, parse $1, $2,..., $ N in sequence, and perform manual processing respectively;2. getopts

Call another script in shell script

Call another script in shell script Bash shell commands are divided into two types: External commands and Internal commands. External commands are implemented through system calls or independent programs, such as SED and awk. Internal commands are

The while LOOP trap and shellwhile trap in shell

The while LOOP trap and shellwhile trap in shell When writing A while LOOP, I found a problem. In the while LOOP, I assigned values to variables, Defined variables, array definitions, and other environments, and the environment became invalid

Small if else statement in Shell

The if else statement in Shell shows how to learn little shell quietly. Today we can see if else Hello ~ The following script is used to judge the parameters of the script executed by the user. If it is hello, it will show how are you. If there is

The cause of variable assignment loss caused by MPs queue used in shell script

This problem was discovered when the SGE startmpi. Sh script was transformed. Consider the following shell code: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#! /Bin/sh # Declare-I Testline =

Summary of fork, source, and exec in Shell (including environment variables)

Summary: three methods of executing shell scripts, fork, source and exec, are summarized.  Prerequisites 1. any program we run is a child process generated by the parent process. After the child process is completed, it is returned to the parent

Create an unzipped installation package in Shell

Create an unzipped installation package in Shell Principles In Linux, you can use several basic commands to create a self-extracting program. The principle is: The Cat command can be used to connect two files (with> append can achieve the same

Total Pages: 15 1 .... 11 12 13 14 15 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.