Determines whether a parameter is an integer in shell.

Determines whether the parameter is an integer.#! /Bin/bash function inttest () { for Arg DO # Arithmetic Operators, when the parameter is an integer, the execution fails. ($ Arg) 2>/dev/null # blocking error information If [$? = 0] then

Linux Shell Io redirection

I often see 1> & 2 similar statements in Linux shell scripts. What does this mean? In fact, both of them are Linux file descriptors. in Linux 0 indicates standard input. 1 indicates standard output 2 indicates error output Another special one

Use environment variables in makefile and Shell

Variables can be used in makefile by $ (VAR) or $ {var}. For details, refer: Http://blog.csdn.net/lovetangtang/archive/2005/12/31/567297.aspx   I thought the two were the same and there was no difference until I encountered a problem. Because of

One of shell Study Notes

1. First look at a common command PS-EDF | sort | uniq | grep-V sh | more This command combines several different shell commands, which have this feature. Uniformity and simplicity. You can use pipeline commands to combine multiple shell

Shell Selection Method

Enter the following command to understand the shell currently logged on: $ Echo $ Shell /Bin/bash The system uses bash shell. There are many other shells. You only need to enter the new shell command (Ksh, tcsh, CSH, sh, Bash, etc.) in the

Linux Shell syntax

Linux Shell is a powerful script program with simple syntax. The following is an executable sh script, covering common shell syntax and usage. Understanding it is equivalent to getting started.   #! /Bin/bash# Title:# Date :?# Author: Made by

Shell learning notes-processing of command line parameters

1. Shift remove the first parameter 2. $ # provides the total number of parameters passed to shell scripts or functions.While [$ #! = 0] gradually decreases with shift $ #, And the loop ends.DoCase $1 in EsacShiftDone 3. $ *, $ @All command line

Introduction to Linux Shell udfs (definitions, return values, and variable scopes)

In Linux Shell, you can define functions and call them in shell scripts. The following describes the definition method and the precautions for calling it.   1. Define the shell function (define function) Syntax: [Function] funname [()] { Action;

Learning about single quotes, double quotes, parameter scopes, and eval in Shell

A custom net function is used to capture the IP address, netmask, and broadcast information of the network adapter from the ifconfig output result. ##ip netmask broadcastfunction net(){ name=$1 num=\$$2 /sbin/ifconfig -a | awk '

Shell obtains the current system time

In shell scripts, you often need to obtain the system time to process an operation. Today, the system learns how to obtain the system time. The record is as follows: Linux system time can directly call system variables in shell, for example:Get the

Shell programming in Linux-conditional Testing

  1.Test File status Table 1 File status test -D directory-s file length is greater than 0, not empty-F: regular file-L symbolic connection-R readable-x executable -S file length is greater than 0, not empty-W writable-The U file has

Send mail using msmtp mutt Shell

Send mail using msmtp mutt Shell 1. Compile the software. Software: http://sourceforge.net/projects/msmtp/files/msmtp/1.4.13/msmtp-1.4.13.tar.bz2/download Tar jxvf msmtp-1.4.13.tar.bz2 ./Configure -- prefix =/opt/msmtp Make Make install 2. Check

Run and exec usage of wscript. Shell Objects in VBScript

Http://blog.csdn.net/zmxj/archive/2009/02/25/3937372.aspx The wscript. Shell object provides the run and exec methods. Recently, the project needs to use pscp In VBScript to copy files from the Linux server. The exec method is used. The following

Familiar with shell programming

This is the first thing I did in my company that is directly related to programming and requires shell commands. In fact, I feel that the shell under Linux is the same as the DOS batch processing under windows.   Question: 1. Use the shell language

Use of curl in Shell

Curl is a URL access tool that can be used to construct HTTP request packets and parse the HTTP response returned by the server. It also supports cookie features and can be used to complete basic web browser functions. Curl also supports https, FTP,

Shell script learning-3 (Baidu shell script pen questions)

Question: 1.Extract the rows that contain "warning" or "Fatal" and do not contain "ignor" from the. log file, and then extract the 5th fields separated ":". 2.Write a script and only want to perform simple subtraction. A prompt is required to enter

Shell break statement memo

Shell commands: Common commands and built-in commands. External commands: commands that can be executed at the command prompt. Built-in commands: Implemented in shell, cannot be called as an external program. The internal or external commands are

Semi-manual shell scripts that allow remote hosts to trust each other for SSH connections (without passwords)

#!/bin/bash# trustme [remote user] [remote ip]# example:# trustme xxx 192.168.1.3local_user=`whoami`local_ip=`ifconfig|sed -n '/inet addr/s/^[^:]*:\([0-9.]\{7,15\}\) .*/\1/p'|sed -n 1p`remote_user=$1@$2key_path=/home/$1/# check my public keyif [ !

Shell arithmetic operations

This article is reproduced in: http://blog.sina.com.cn/s/blog_674b5aae0100o2mn.html BASH Shell has four arithmetic operations:1: Use expr external program Addition r = 'expr 4 + 5'Echo $ RNote! 4 + 5 there must be gaps between the three 'Expr 4 + 5

Questions about using shell variables in awk

Questions about using shell variables in awk Author: swysn published at: 2002/03/22 05:01 pm [This post was last edited by Valentine at]2002/01/011312 32132 AA 32132131#! /Bin/shEcho "Enter :"Read

Total Pages: 541 1 .... 334 335 336 337 338 .... 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.