1.1. usage of the Cut command in the shellThe first usage is similar to awk, as shown in awk below :Cat/etc/passwd|awk-f: ' {print $1,$5} 'Cut-d: The colon after-F 1,5/etc/passwd/-d indicates the delimiter between the fields, and-f indicates which
1.1. The data type of the shellthe data type of the shell is a dynamic data type. That is, it does not need to be defined beforehand and can be used directly. The type can be changed at any time during use. For example , awk {' print '}/opt/test.txt
The use and setting of a variable (note that there can be no spaces before and after the equals sign)1. ReadRead the input from the keyboard assignment to the variable, using the following method[Email protected]:/opt/android-sdk/sdk/# read
#!/bin/SHCurr_dir=$ (CD $ (dirname$0);pwd) Td_base=`su-Tduser-c"Echo"${td_base}""`functionchange_app_ip () {if[$#-ne3]; Then Echo "The Param is not correct."Exit1 fi if[" $"!="app_ip"]; Then Echo "The IP type is not
1. Standard input, standard output and standard error outputLinux system open 3 files, standard input, standard output, standard error output.Standard input: Enter data from the keyboard, i.e. read data from the keyboard.Standard output: Outputs the
Function of script programming:Function: FunctionsStructured programming, cannot run independently, needs to be executed when called, can be invoked multiple timesDefine a function:function FUNCNAME {Command}FUNCNAME () {Command}Custom execution
Command line and Shell: the command line refers to the interface that provides user input, which itself simply accepts input and then passes the command to the command interpreter, which is the shell.Note: The command line and file for Linux are
The shell script, as its name implies, is a script written for the shell, as long as there is a text editor and an interpreter that can execute the script.There are many types of Shell in Linux, we can open a text editor (can use the Vi/vim command
HDFs File System:HDFs is a distributed file system to access data, then the operation of HDFs is the basic operation of the file system, such as file creation, modification, deletion, modify permissions, folder creation, deletion, renaming and so on.
One$n: Gets The nth argument of the current shell script, n=1..9, when n is 0, represents the file name of the script, if n is greater than 9, enclosed in curly braces like${10}.$*: Gets all parameters of the current shell and treats all
The file name of the shell itself$1~ $n Each parameter value added to the shell. $ $ is the 1th parameter, and the $ = is the 2nd parameter ...$$ the shell itself PID (ProcessID)$! PID of the Shell's last running background process$? End code of the
(a) Ideas(1) Install the virtual user by Yum install vsftpd*-y(2) Shutting down the firewall and SELinuxService Iptables Stop Setenforce 0(3) Install the Virtual user authentication module(4) Create a virtual user's login name and password(5)
Used to automate some of the front-end publishing operations.Script:# Webreleasepath is used to publish the directory, Webrevisionpath is the development of the directory
One, variableA variable is a container in which different values can be placed.Key facts:Path,home,pwd,logname these are variables.Example:[[email protected] ~]# echo +ba+~]# echo $a +$b3+4~~ ]# echo $a 3$b4~]# echo $a"3"$b334 The summation of
1. Write a script to determine what the IP of the current online user is (there are many methods) in the 10.0.0.0/24 network.#!/bin/shfor N in ' seq 254 ' does ping-c1-w1 10.0.0. $n &>/dev/null If [$?-eq 0] then echo "10.0.0. $n is up
Writing ScriptsVI delbak.shThe code is as follows :#!/bin/shlocation= "/home/mysql/backup/"Find $location-mtime +7-type f |xargs rm-fexplanation :Location is the directory where the lookup is set--mtime +7 is set to 7 days ago (delete files from
Use the conditional function if to compose a shell function called F_judge, which implements the following functions1) when the/home/log directory exists, move the files or directories that start with all TMP in the/home directory to the/home/log
1: The cause of the problem, the deployment of hadoop-2.6.4 WINDOW10 operation Hadoop API error, the specific error is that I upload files to HDFs, but also better, previously resolved, not described here, here to say the error from the HDFs
Install Putty.exe, the following EXE files are installed in the installation directoryCreate File Put-file-mobile.txtRM Mobile.warput D:\SVN_LZY\dragon-tour-2_1\lzy-mobile\target\mobile.warexitCreate a batch file release-mobile.batPsftp.exe [email
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