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
From: http://xierongzhong1.blog.163.com/blog/static/5232328620102921658692/
Shell may often see:>/dev/null 2> & 1
Command results can be defined in the form of %>
/Dev/null indicates an empty device file.
> Indicates the
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
If you have multiple NICs, you must specify the NIC name because the IP address is related to the NIC.
The method for getting the IP address of the specified Nic is:
Ifconfig eth0 | sed-n "p" | awk '{print substr ($ )}'
"Eth0" indicates the
Shell learning 2: ASPack 2.12 shelling
SkyjackerHttp: // blog.csdn.net/skyjackerEmail: hemiaoyu gmail.comQQ: 677055172007-2-10
1. Shelling Process
Automatically write a simple form program.Use aspack2.12 shelling (by using a volume) to generate the
1. Create and run Shell programsWhat is a shell program? Simply put, a shell program is a program that contains several rows.Shell or Linux Command file.Like programming in advanced languages, writing a shell program requires a text editor, such as
Linux mobile phone DIY. Shell application extension 1. Random incoming ringtone (e680 Series)
Papayas
2007-03-18
I. What is shell?
Before getting started, I always used to copy some stuff from the Internet to "enrich" the content of the
We have completed the first three steps. We will analyze the implementation of the entire shell script again:
Implementation Process Analysis:
1. Partition: Format and partition the selected disk.
2. Attach the disks in user-defined partitions to
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'
How to extract the line Content Code specified by the file:
If you only want to view the first five lines of the file, you can use the head command,For example: Head-5/etc/passwd
If you want to view the last 10 lines of the file, you can use 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
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
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,
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
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
Today's group asked a question:Echo 123 | md5sumBa1f2511fc30423bdbb183fe33f3dd0f-Php-R "Echo MD5 ('20140901 ');"202cb962ac59075b964b07152d234b70The MD5 values of the two are inconsistent, so there are many interesting solutions:1 MySQL
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