After I recently changed Ubuntu, I felt dizzy and eye bloat easily. Because I installed eye protection software on Windows, the screen lock will automatically prompt users to rest their eyes at regular intervals. Google hasn't found an
#1 Add the execution permission chmod U + x a to the script. sh, and then you can directly use the full path to execute the script, for example, in the current folder. /. sh. If the directory where the script is located is in the path environment
Getop string1 string2 .. the characters marked in nstring1 indicate valid signs (-can be followed by characters). If there are: After the flag, it indicates that this sign is followed (there can be 0-N spaces) stringx is its parameter. getop
The rsh command is short for remote shell. This command starts a shell on the specified remote host and executes the command specified by the user in the rsh command line. If the user does not provide the command to be executed, RSH uses the rlogin
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
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
Source: http://zhidao.baidu.com/question/322131711.html
File comparison operator-E filename if filename exists, it is true [-E/var/log/syslog]-D filename if filename is a directory, it is true [-D/tmp/mydir]-F filename if filename is a regular
Linux running levelAfter Linux is started, it runs at one level. The following lists the running levels:0 system stopped1 single user system, no login required2 multi-user system, but does not support NFS, command line mode Login3 full multi-user
$ @ Refers to all command line parameters. Each parameter is enclosed ""
$ * Indicates all command line parameters
The following procedure:
Test1.sh
-------------------
Sum = 0For VaRIn "$ @"DoLet sum = sum + $ VaRDoneEcho "sum = $
(1) substr in awkSubstr (source string, start index, length) Start index starts with 0Example:Awk '{$ A = substr ($, 2); print $ A;}' filenameAssume that only one row in the file is abcdefg, the returned result is AB.
(2) expr substrExpr substr
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
Observe the Oracle database performance. The AWR feature provided by Oracle provides us with a nearly perfect solution. With AWR features, we can extract AWR reports from the database at any time. However, we need to provide some interactive
The flexible combination of Linux/Unix shell and SQL variable transmission greatly improves DBA efficiency, this article provides a few simple examples of passing variables between Linux/Unix shell SQL statements for your reference.
Call SQL in
RMAN backup is easy to use for Oracle database backup and recovery, with low costs. For non-catalog mode, it is undoubtedly the first choice to embed the RMAN script into the shell script and then use crontab to back up small and medium databases.
Http://itsecuritylab.eu/index.php/2010/07/05/hide-shell-in-a-target-system/
It seems that you like shell very much. It's cute and happy. Next we will introduce a method to hide shell. htaccess attack.
This must be an Apache server.
Click it to
F statement format
If conditionThenCommandElseCommandFi, don't forget the end.
If statements forget the final fiTest. sh: line 14: syntax error: unexpected end of fi
Three conditional expressions of if
After Onda v811 was upgraded to 4.22d, it was successful to use the master to root the machine. Baidu root is a floating cloud. It's worse than the flash master of a small company in Shenzhen!
After root, log on to shell or shell @..., not root @...
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.