Alibabacloud.com offers a wide variety of articles about learn android linux command line shell, easily find your learn android linux command line shell information here online.
? Usage;;EsacDone# $OPTIND is a special variable that represents the first few options, with an initial value of 1Shift$(($OPTIND-1))#除了选项之外, the script must meet at least one parameterIf[$#-eq 0 ]then Usagefiif [-Z "$DEVICE" ]then #该脚本必须提供-d option echo "You must specify DEVICE with-d option "exitfiecho " you chose the Following options: " echo "quiet= $QUIET verbose= $VERBOSE device= $DEVICE logfile= $LOGFILE" for file in [emailprotected] #依次处理剩余的参数 doecho "processing $file" done The
.
$@----with "parameter 1" "Parameter 2" ... Save all parameters in the form
$$----This program's (process ID number) PID
$! ----The PID of the previous command
In this way, even with a shell, you can write powerful, interactive, and user-friendly scripting programs.
Finally, note that Python performs system commands in two different ways:
Os.system (CMD): direct one or a group of system comma
Look at the previous section: Linux Shell Data Redirection (input redirection and output redirection) detailed analysis It is estimated that some friends are dizzy, so complex redirect. This time we'll take a look at the pipe command. Shell pipe, it can be said that the usage is much simpler.
The pipe
Update a library with the PIP commandPip Install--upgrade library namesuch as updating the Scikit-learn packagePip Install--upgrade Scikit-learnCannot import name Mlpclassifier workaround:Scikit-Learn v0.17 only BERNOULLIRBM, no mlpclassifier. Only needto upgrade Scikit-learn to v0.18. Enter any of the following commands in the console: Conda update scikit-LearnP
Shell Special variables: Shell $0, $#, $*, [email protected], $?, $$ and command line arguments special variable list variable meaning $0the file name of the current script $n the arguments passed to the script or function. N is a number that represents the first few parameters. For example, the first argument is a $1,
.
① Command mode: Enter the command vi after the shell prompt is attached, enter the vi editor, and run the command vi. In this case, any character entered on the keyboard is interpreted as an editing command.
② Input Method: Input vi's INSERT
Linux Command Line input summary, linux Command Line SummaryLinux basic command input
New User: useradd [user name]; Change User name: usermod-l (Note: lowercase letter L) [user name yo
To learn about Linux, you must learn Shell commands-general Linux technology-Linux technology and application information. The following is a detailed description. Do you agree with this idea? If you do not
This article to share the content is about the PHP command line to write the shell command instance, the content is very detailed, the need for friends can refer to, hope can help you.
PHP can run like Java Perl Python, and today I find that if I knew this early, maybe I wouldn't
| (pipeline) is a very powerful weapon. Fortunately, JQ also provides support for the pipeline.
Copy Code code as follows:
% JQ '. cn[] | {Pnum} ' Soundtag.json
Here, we use the pipe to filter and construct the Pnum object.
Iv. Summary
If you need to process JSON at the command line, I strongly recommend JQ. JQ can not only meet the common requirements, but also include operations, built
Use fetion in Linux Command Line and linux Command Line fetionDownload the fetionprogram and other linuxso programs from http://www-it-adv.net/1. Install FeixinDecompress the package in windows and upload it to
Linux Command Line options and parameters, linux Command Line options
1. main function parameter form
Int main (int argc, char * argv [], char * env []); // The first argc parameter indicates the number of parameters in the
The command line sends an email, and the linux Command Line sends an email.CentOS
Stop or remove sendmail: yum remove sendmail
Yum install postfix
Yum install mailx
Check whether the MTA is Postfix: alternatives -- display mta
If you do not change the default MTA to Po
. Sometimes we need to read the first line from the BEGIN statement block.We can specify some conditions for the rows that need to be processed, such as:The default field delimiter is a space. We can explicitly specify a delimiter with-F "delimiter": $ awk-f: ' {print $NF} '/etc/passwd$echo | awk ' {' grep root/etc/password | getline cmdout; print Cmdout} ' can read the output of an external shell
This article is part of the Linux Shell Series Tutorial (eight), more shell tutorials: Linux Shell Tutorials
In previous: Linux Shell series Tutorial (vii)
screen.# Ctrl-q: Re-activates the output to the screen.The default shell, ' Bash ', has historical editing and tab completion.# Up-arrow: Start history Command search.# Ctrl-r: Start incremental History Command Search, you can follow the keywords to find out which commands you have used.# TAB: Complete the input file name to the
1. Shell script is actually a program written using the shell's function, which uses plain text files to write some shell syntax and instructions inside, with formal notation, Pipeline command | and data flow redirection, to achieve the purpose we want to deal with.2. The simplest function of script is to complete a number of successive instructions placed on
Mail command to check our mails
Path executes the file's lookup paths, separated by directories and directories;
Lang language variable, our Chinese encoding is generally zh_cn.gb2321 and utf-8
Random number variables5. View variables with SetBash is not just an environment variable, but also some variables related to the operation and interface, as well as the user's own defined variables. Set all other variables inside bash are display
Small knowledge (take PS as an example):
View command path which PScommand to help PS--helpCommand Complete manual: Man PS
Description
The PS full name is the process status (process state), and he is the one who provides information about the processes.
The PS command is used to report the current system's process state. Can be used with the kill command at
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.