#!/bin/bash # Check if the 192.168.1.1-192.168.1.254 host is aliveFor IP in 192.168.1. {1..254};DoIf ping-c 1 $ip >/dev/null; Thenecho "$ip OK."Elseecho "$ip no!"FiDone#!/bin/bash #检查多个域名是否可以访问Url= "www.baidu.com www.sina.com www.jd.com"for URL in
Http://www.1987.name/141.htmlShell Basics
Terminal printing , arithmetic operations , frequently used variables
Search for a specific string under the specified folder and highlight matching keywords under Linux
Get standard input from a
1, list_sys_status.shDisplays the following information used by the system:Host name, IP address, subnet mask, gateway, DNS server IP address information#!/bin/baship= ' Ifconfig eth0 | head-2 | Tail-1 | awk ' {print $} ' | Awk-f ":" ' {print $} 'zw=
---------Transferred from http://www.runoob.com/linux/linux-shell-array.html----------Copyright belongs to the original! Shell some powerful commandsShare some shell usages and scripts that you may not know about, simple & powerful!Before reading
OneHttp://www.cnblogs.com/GarveyCalvin/p/4301235.htmlTwoForeword: Zsh can be configured strong, user can customize the configuration, personalization is strong. Zsh Tab Completion is more powerful, this feature allows us to save a lot of time. Zsh
Test command, Loop statementTest command format:Test conditionUsually, in the If-then-else statement, [] instead, that is, [condition]. Note that there are spaces on both sides of the square brackets.Common commands:-a two conditions at the same
Shell Authoring Steps:1. Scripting Vim first.sh2. Write the complete test script Bash-n first.sh3. Granting permission chmod +x first.sh4. Execute the script./first.shPS Shell Script Learning first need to understand Linux, system commands and
shell script : hello.sh#!/bin/bashecho"I am in shell script"echo"param 1 is'echo'param 2is $"variable=$[$1 + $2 ]echo"sum is $variable"System Interface : SYSTEM.C#include void main (void) { printf ("I am in C code!\r\n" System ("/bin/bash"). /
http://blog.csdn.net/lishuhuakai/article/details/11928055#include #include#include#defineMAXLINE 80voidSetup (CharInputbuffer[],Char*argv[]) { intI, J; Char*p; I=0; for(p = inputbuffer;;p + +)/*Splits the character command for a period of time,
Find File LookupFind txt and PDF filesFind. \ (-name "*.txt"-o-name "*.pdf" \)-printFind files that start with all lettersFind. -name "[a-a]*"Find all non-txt text with negative parametersFind. ! -name "*.txt"-printSpecify the search depth to print
DevelopmentShellscripts are implemented with script arguments , respectively, andReadRead inthe way to compare2an integer size. Use conditional expressions (prohibitif) and remind the user to compare the results in the form of a screen output. Note:
Have you ever felt that it's hard to write a long, absolute path when executing a script, to make it easy and easy to write your own script and start your footsteps as if you started Apache. (PS: Actually Apache is also a script)First, to understand
Time limit:16000/8000 MS (java/others) Memory limit:65536/65536 K (java/others)Total submission (s): 999 Accepted Submission (s): 434Problem descriptionperhaps The sea ' s definition of a shell is the pearl. However, in my view, a shell necklace
#!/usr/bin/Envbash## Licensed to the Apache software Foundation (ASF) under one or More# contributor license agreements. See the NOTICEfiledistributed with# this work foradditional information regarding copyright ownership.# the ASF licenses
Use shell scripts to simply simulate simultaneous read and write operations to specific filesFormat of file contents:Field1, Field2, field3, Field4As a delimiter, but there are spaces.
The script uses the following:
Standard input and output with standard error outputStandard input/The output is probably the most important concept in the design principles of software tools..His idea was to:The program should have a data source,Data Export(where are the data
Turn from:Linux shell ${} simple usageFor the sake of completeness, I'll use some examples here to illustrate some of the supernatural powers of ${}:Suppose we define a variable as:File=/dir1/dir2/dir3/my.file.txtWe can replace each other with ${}
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