Preface:
SSH command. No password parameter is specified. so that when using the SSH command in the script, you must manually enter the password to continue the execution. this makes the automatic execution of scripts very poor, especially when the number of machines corresponding to SSH is large. this article describes two methods: one is to use the CT
1. ldd is not an executable program, but a shell script. 2. ldd can display the dependency of the executable module. The principle is to set a series of environment variables, as follows: LD _
1. ldd is not an executable program, but a shell script.
2. ldd can display the dependency of the executable module. The princi
Article from:
Http://learn.akae.cn/media/ch31s05.html
Conditional test for shell script Syntax: test or [
CommandtestOr[You can test whether a condition is true. If the test result is true, the exit status of the command is 0. If the test result is false, the exit status of the command is 1 (note that the logical repr
The TR command is used to replace the contents of the standard input. For example# echo ' HELLO World!!! ' | TR "A-Z" "A-Z"Hello World!!!Here the "A-Z", "A-Z" all represent the collection, the shell script defines the collection type is very simple, that is, the specified collection sequence, but for the upper case, must not enter all the collection type, can be
distinguish between different kinds of devices, while the secondary device number is used to differentiate multiple devices of the same type.The Linux kernel uses a virtual file system (SYSTEM,VFS) as an interface for interacting with each file system. This provides a standard interface for any type of file system communication within Linux. When each file system is mounted and used, the VFS will slow down the information in the kernel.This core set of tools for use by Linux systems is called t
protected] ~]#[Email protected] ~]# wc-l/etc/passwd46/etc/passwd[Email protected] ~]# WC-CMLWL/ETC/PASSWD2027 2027 74/ETC/PASSWD[Email protected] ~]# WC-CMLLW/ETC/PASSWD2027 2027 74/ETC/PASSWD[Email protected] ~]# WC-WCMLL/ETC/PASSWD2027 2027 74/ETC/PASSWD[Email protected] ~]#Here's the problem: from the command line above, the order of the WC output data seems to have nothing to do with the order of several parameters.Example two with WC
This article was reproduced from: Http://yejinxin.github.io/parse-shell-options-with-getopt-commandIn a previous article, we described how to use the shell's built-in getopts command to help us with Shell scripting options and parameters, with the drawback that we could only handle short options and not handle long options. Below, this article is going to cover t
Linux Shell script entry-tee command usage instructions when executing Linux commands, We can redirect the output to a file, such as ls> a.txt. Then we cannot see the output, if we want to save the output to a file and view the output on the screen, we can use the tee command. The tee
Look at a little script#!/bin/bash#demonstarting the shift commandcount=1while"$" Do "Parameter # $count =$1" Count 1] ShiftdoneechoechoThe script first tests whether the first parameter exists as- n "$" , prints if it exists, and then all parameters move to the left one position, and the value of the variable is overwritten, and the variable $ (that is, the program name) It's no
===============================================2018/9/12_ the 1th time to modify Ccb_warlock===============================================Problem:Upload the Sh script (tmp.sh) written in VS code to the server (CentOS) and run The Times "$ ' \ R ': No Command found".Solution:After checking the information to know, because the script
Getopts is a bash shell built-in command that parses a command-line pass in a shell script, passes it to a function, or passes it to a shell script that is passed to another call (optio
Often when writing a shell script, you will encounter a different user to execute the relevant commands, the way to simply note:
1. Execute a single command: su-user-c "command"
For example, the following command is to create a test123 directory under the/data directory
Recently doing a small brush database function, you need to batch add to different tables, write good php files, log on to a serverThe command to upload a file: rz a pop-up box can be selected to upload a fileExecute file and report error COMMAND:/USR/LOCAL/PHP-5.6.10/BIN/PHP-NL sousuojieguo.php where php-5.6.10 is serving PHP versionExecute File no error:/usr/local/php-5.6.10/bin/php sousuojieguo.phpView t
.[:xdigit:]all hexadecimal digits.Use methods such as the following. For example [: Upper:] is equivalent to [a-z],[:d Igit:] equivalent to [0-9].[root@xuexi"one ONE 1 two TWO 2 three THREE 3""[:upper:] \n" ONE TWO THREE [root@xuexi"one ONE 1 two TWO 2 three THREE 3""[:alpha:] \n"one ONE two TWO three THREE [root@xuexi"one ONE 1 two TWO 2 three THREE 3""[:digit:] \n" 1 2 3Back to series article outline:http://www.cnblogs.com/f-ck-need-u/p/7048359.htmlReprint Please specify source:http
1. Delete the BOM and execute the following command under VI.
: Set nobomb
2. cause:
The so-called Bom is the byte order mark, which is a Unicode character that usually appears at the beginning of the text to identify the byte order (big/little endian ), in addition, you can also identify the encoding (UTF-8/16/32)
For UTF-8/16/32, 8/16/32 in their names refer to the number of bits in the encoding unit, that is, their encoding units are 8/16
configuration file, why does the view appear not found, because the file is not loaded, loading the file in two ways, one is source. BASHRC the other is. . BASHRC-bash:alias:cls: Not found [[email protected]~]# source. BASHRC Hellow[[email Protected]~]# alias Clsalias cls='Clear'[[Email protected]~]# [[email protected]~]# Aliasalias CLS='Clear'aliasCP='cp-i'aliasEgrep='egrep--color=auto'aliasFgrep='Fgrep--color=auto'aliasgrep='grep--color=auto'alias L.='ls-d. *--color=auto'alias LL='ls-l--color
When writing the shell script to find that the CD switch directory can not switch, the code is the following.1 #!/bin/bash2#changedir. SH3history4 cd/home/ Firefox516 pwdI think carefully, I carry out the time is. Changedir.sh to execute, so that the terminal will produce a child shell, the child shell to execute my
CutThe Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# cut-d ' The delimiter character '-f fields The PATH variable is as follows[Email protected] ~]# echo $PATH/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/x11r6/bin:/usr/games# 1 | 2 | 3 | 4 | 5 | 6 | 7To take the path variable out, I'm going to find a fifth path.#echo $PATH | Cut-d ': '-f 5/usr/local/binTake
files are stored here/var variable directory for storing frequently changing files, such as days files.CD commandToggle File DirectoryThe directory path has two absolute and relative pathsAn absolute path defines the exact location of the directory in the virtual directory structure, starting at the root of the virtual directory, equivalent to the full name of the directoryAbsolute paths always start with a forward slash (/)Example:/usr/binUsing an absolute path can clearly indicate exactly whe
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.