1, write a small script named getarp.sh, log the MAC address of each host in the LAN:1. Writing getarp.sh script files(1) Send ARP request via arping command, record MAC address according to feedback result.(2) Assign a network segment address (such
If Else judgment statement If statementSyntax Format 1:if condition then statement 1 Statement 2 ... Statement NFISyntax Format 2:Often used in terminal command prompt if [conditional];then statement; fi If Else statementSyntax format:if
See if the script syntax has errors:Bash-n modify_suffix.shTrack executionSh-x modify_suffix.sh AAA1.${var} 2.$ (cmd) 3. () and {} 4.${var:-string},${var:+string},${var:=string},${var:?string} 5.$ ((exp)) 6.$ (Var%pattern), $ (var%%pattern), $
First, System variablesPerform an env, set view system, or environment variable directly at the command line prompt. ENV displays user environment variables, set shows the shell predefined variables and user variables. Can be exported to user
Google Chrome app store has a powerful SSH client (which can replace Putty). The key is that it is integrated into the web page. below is:
Its strength is exactly what Chrome's powerful native client has created.
The native client can be
Start password for Shell application programming. Welcome to welcome.
Description: If you want to lock access to the terminal but do not want to exit and log on again, you can write a script.Program.
When the script is called, you can exit only
To delete a process named "ABC", follow these steps!
1. view the process, for example, a process named ABC. You can view its details as follows:
PS-Aux | grep-I "ABC"// View all processes that contain ABC characters;
2. Remove the grep
From http://vc88.javaeye.com/blog/658764
Shell if interpretation statement[Front and back Spaces] Leading space[-A file] true if the file exists.[-B file] If the file exists and is a special block file, it is true.[-C file] If the file exists
/** Reference address of this article: * /// Note: If I use ubuntu11.4 and run shell script sh test, an error is returned. Run/bin/bash test to obtain the correct result.
String Truncation in Shell
STR = "abc123abcabc"
# Calculate the length of
1. Preface
This is a series of learning documents. Based on the spirit of Internet sharing, it mainly comes from the shell area on the Forum. It has been organized and is the content of a book. Therefore, copyright belongs to the original author
Netsh (Network shell)
Configure network interfaces, Windows Firewall, routing & remote access.
SyntaxNetsh [Context] [Sub-context] command
KeyThe contexts and commands available vary by platform, the list below is for Windows 2008.Use interactive
Creation: 00:49:46Author: unlinuxFrom: http://www.Unlinux.com
MeI am a newbie myself. I haven't been in touch with Linux for a long time. Recently I encountered a problem when I learned the bash Export command (the book says that export is changing
Linux Shell script programming-SCP command details
Command: SCP
There are three common methods to copy files between Linux:
The first is FTP, that is, one of the Linux installation FTP server, so that another client program using FTP can be used to
Address: http://www.examw.com/linux/all/114976/index.html
Test command usage. Function: Checks files and comparison values.
1) judgment Expression
If test (expression true)
If test! The expression is false.
Test expression 1-A expression 2 both are
1. What is shell?The operating system interface. The shell can call the corresponding hardware through the kernel.2. What is Bash?Bourne again shell (BASH) is actually a version of shell.3. BASH Shell functions:1) command compilation function
In the process of system O & M, log files are often very large. In this case, we need to split the log files. Here, we use shell scripts to split the files :#! /Bin/bash
Linenum = 'wc-l httperr8007.log | awk '{print $1 }''
N1 = 1
File =
Shell: common date methods
Obtain the time string in LinuxCommand date# Output the current time of 23 days in the format of yyyymmdd$ Date + % Y % m % d-date = '23 days ago'
$ Date-uThu Sep 28 09:32:04 UTC 2006
$ Date-RThu, 28 Sep 2006 17:32:28 + 080
Java Sorting Algorithm Implementation Code-shell sorting
/**
* The Java sorting algorithm implements code-shell sorting.
*
* @ Author old zizhu Java century network (java2000.net)
*
*/
Public class test {
Public static int [] A = {10, 32, 1,
This article is also the fifth chapter of "Learning the bash Shell" 3rd Edition, five of Flow Control's reading notes, but we will not limit it to this. Flow control is a common part of any programming language, including while and util, which are
// Use shell to search for multiple files find. -type f | xargs grep flash description: find the files in the front directory and Its subdirectories that contain flash files // record the xargs command: xargs obtains the parameter list and one
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.