After obtaining the source code of 007 shell, I couldn't compile the source code. After reading the source code, I corrected a small bug and compiled OK.Run "./007 shell-s" on one Linux and "./007 shell-c-h ip_of_linux" on the other linux2 ",A
WC
StatisticsThe number of words, lines, and characters in the file.
WC syntax
[Root @ WWW ~] #WC[-LWM] Options and parameters:-L: only list rows;-W: Only the number of words listed (one English word );-M: The number of characters;
WC
Fork
Usage: fork/directory/script. Sh
Fork is the most common. It uses/directory/script. Sh directly in the script to call the script. Sh script.
Run a sub-shell script to execute the call. When Sub-shell is executed, parent-shell is still
Simple usage
#! /Bin/sh (sleep 10; echo "username"; sleep 10; echo "password"; sleep 10; echo "PWD"; sleep 50; # echo exit) | Telnet $ IP
Connect to the remote machine and check the current directory.
Username/password is the username and
When learning Linux shell scripts, one of the most common errors is to useFor(For line in $ (cat file.txt) do ...) Read files row by row. The following example shows the result.
File file.txt content:
Cat file.txt
This is the Row No 1;
This is
-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
Shelll basic programming theory and some examples
Abstract: This article describes how to compile a shell script based on a large number of instances. (13:27:24)
Why shell programming?
In Linux, although there are various graphical interface
Problem: It is necessary to pre-process a file of several GB and tens of millions of lines.
Function: splits records in a file into different files according to certain rules.
Advantage: It is really convenient to use shell scripts for text
Several Popular Shells
Currently, popular shell types include ash, Bash, KSh, CSH, and zsh. You can use the following command to view your own shell types:# Echo $ Shell$ Shell is an environment variable that records the shell type used by the user.
Use VC # easily create SQL Shell
(Author: mikespook | Release Date: 354-10-7 | views)
Keywords: C #, database, extended stored procedure, Vulnerability
This article has contributed to the hacker security base. The article is owned
1. variable order
In the script, there is no global or local variable for the same process.
It is just a break. If you use a variable in a function, and there is no trace of this variable outside the function. However, as long as you have called
Mainly shell several common operations: 1 shell and awk combined with 2 shell string operations 3 shell file operations and awk combined 4 file MD5 verification 5 results output 6 passing parameters, etc.
The following content cannot be
Using shell scripts to monitor and manage Oracle databases will greatly simplify DBA workload, such as common instance monitoring, monitoring, and alarm log monitoring, and database backup, AWR report automatic mail, etc. This article describes how
I. Introduction
For the purpose of compressing program resources and registering and protecting program resources, the shell can be divided into two types: Compressed shell and encrypted shell.UPX aspcak telock pelite nspack...Armadillo asprotect
Some common shell commands in Linux
For many programmers who often program in XP, it is not a habit to suddenly switch to programming in Linux, because a lot of things that can be done with the mouse in XP before, now we use commands to complete the
In the Linux Shell environment, input and output redirection is supported, expressed by symbols .
0, 1, and 2RepresentStandard input, standard output, and standard errorInformation output. It can be used to specify the standard input or output to
5 whileNumber of cyclesFoo = 1 // initial cyclic valuesWhile ["$ foo"-le 2] // le: DoEcho "Are you there"Foo = $ ($ Foo + 1) // This form is very important to foo ++Done
6Until ConditionDoStatementsDoneThe until loop is executed repeatedly until the
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