Many people think that, like passwd and Su, Telnet cannot work automatically through pipelines and input redirection, but in fact Telnet supports input redirection. although, strictly speaking, shell scripts cannot enable telnet to enter the
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
Bibliography:Guide to shell script learning, compiled by o'reilly Taiwan by Arnold Robbins & Nelson H. F. Beebe, published by Mechanical Industry Press
P24:
By default, when a shell execution has an executable attribute"ProgramThe shell will
Similar to awk Functions
Example 1
$ A = 'echo root: X: 0: 0: Root:/root:/bin/bash | cut-D: -F 1,5 'shuohailhl @ shuohailhl-PC/cygdrive/d $ echo $ aroot: Root
In the preceding example, the root: X: 0: 0: Root:/root:/bin/bash command is
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
Is_upper ()
# Is_upper
# Checks tosee if we have a string in upper case
# To Call: is_upper $1
{
# Check we have the right Params
If [$ #-ne 1]; then
Echo "is_upper: I need a string to test OK"
Return 1
Fi
# Use awk to check we have only
Example 1#! /Bin/shcase ${1 # *. Tar.} In bz2) tar jxvf $1; GZ) tar zxvf $1; *) echo "Wrong file type" esac$1 indicates the first command line parameter ${1 # *. Tar.} when running the script. It indicates that the first command line parameter is
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 scripts are the core of Linux, while regular expressions are the core of shell scripts. Understanding regular expressions can quickly match the content to be searched, lay a solid foundation for future shell script programming.
The contact
Dialogue Unix: Hello, shell!
One of the most peculiar and prominent features of UNIX systems is itsCommand LineFunction. You only need to enter a small amount of text that contains a certain logical relationship, you can use the command line to
Android automated test shell script (fast asphalt5)
This article is my original, reproduced please indicate the source: http://blog.csdn.net/lhzhang1985/article/details/6580595 thank you!
Because Automatic Testing of the high-speed asphalt5 is
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
System: Ubuntu 9.04
"After logging in, type CHSH and press to change the default shell. Depending on the system, you may be asked to enter your login password and the name of the shell to be used. Enter the complete path of the shell to be used.
1. system environment variables after the user logs on to the system:$ Home user's own directory$ Path: the directory to be searched during Command Execution$ TZ Time Zone$ Mailcheck the number of seconds to check whether a new letter exists$ PS1
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
Standard InputThe standard input is the file descriptor 0. It is the command input. The default input is the keyboard, or file or other command output.
Standard outputThe standard output is the file descriptor. 1. It is the command output. The
-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
The awk program allows calling shell commands and provides pipelines to solve the problem of data transmission between awk and the system. Therefore, awk is easy to use system resources. There are two main methods:
A. Syntax] awk output command |
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