Not comprehensive but practical.
1. xargs -- pass the output of one command to another
1.1 Find./modules/-name *. So | xargs CP-T $ {packdir_so }/
Output find to CP as the Source Parameter
-T specifies the target path of the CP.
2. Date =
1. General methods
Regedit/E c: \ 3389.reg "HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Terminal Server \ winstations \ RDP-TCP"
Type C: \ 3389.reg | find "portnumber"
Del c: \ 3389.reg
2. XP and 2003Reg query
ShellA process is a process that executes other processes, but when executing a command,ShellThe process instructs the kernelProgramRun the command separately as another process and write the output to the terminal.
Through Command Options, we
recently, I have been engaged in Unix shell and read a lot of books and materials in this process, therefore, we will record some of the details to be noted for the purpose of memo and reminder. The shell here refers to the Bourne shell. I have
$ # Number of Script Parameters $ * display all parameters passed to the script in a single string. Unlike the location variable, this option parameter can contain more than 9 $ ID of the current process running the script $! The ID of the last
args.txt
#! /Bin/bash if [-Z $1] | [! -E $1] thenecho "Usage: cmd. sh input "exitfiecho $ 0for num in $ *; do echo" $ num "Done For I in $(SEQ-3 $ #); do echo $ I done for I in {0 .. 5} Do echo $ I done echo $ @ for (I = 4; I $ savepathawk '{A [$0]
Linux Shell is a command binder in Linux. It is easy to combine those tools to make a more powerful tool or automate the work at hand.
Batch is also available in windows, and this function is also available in theory. However, its syntax and
In the shell studyCode
# ! / Bin / Bash# User can keyin filename to touch 3 New Files.Path = / USR / Local / Sbin: / USR / Local / Bin: / USR / Sbin: / USR / Bin: / Sbin: / Bin: / USR / GamesExport pathEcho
Sunflower remote control software is junk!
A few days ago, I tried sunflower remote control software and felt it was drivingProgramInstallation is stupid. Later, the software was completely uninstalled from the control panel.
Next, the system's
#! /Bin/sh
# Show script description, different colors
Echo-e"\ E[34; 1 m ###################################### ##########\ E[0 m"
Echo-E"\ E[34; 1 m ### format like 'analysis _ log. Sh 2007-07-01 '###\ E[0 m"
Echo-E"\ E[34; 1 m ###
The script is:Nohup/mnt/nand3/h2000g>/dev/null 2> & 1 &For & 1, it should be file descriptor 1, while 1 generally represents stdout_fileno. In fact, this operation is a dup2 (2) Call. it outputs the standard output to all_result, and then copies the
WriteCode
Be preparedProgramAfter it becomes easier to learn what to do and how to use a program, a programmer must record his ideas and tell the computer what he wants. This is the so-called code to be used. Generally, organize your own thinking
I. Practice
In the current directory, You need to rename all the files in the format of school1, school2 ...... And so on
#! /Bin/bashEcho hello;
A =1;ForI in *;DoEcho$ I;MV$ I "School $";A = $ (($+1));#A = 'expr $ A + 1' doesn't seem to
When writing a program, you sometimes need to call the shell script in a Java program. You can use the exec method of runtime to call the shell program and run the script.
Each Java application hasRuntimeClass instance, so that the application can
1. Delete 0-byte filesFind-type F-size 0-exec Rm-RF {}\;
2. View ProcessesSort by memory from large to smallPS-e-o "% C: % P: % Z: % A" | sort-K5-NR
3. sort by CPU utilization from large to smallPS-e-o "% C: % P: % Z: % A" | sort-NR
4. Print the URL
Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/
I. "'$ var '"In this way, you do not need to change the habit of using the awk program. It is a common method used by foreigners. For example:Var = "test" awk 'in in {print "'$ var '"}'In this
According to the shell programming of laruence's private dish, there is an inexplicable problem.For example:
# Test if else
Read-P "input y/n? : "YN
If [$ YN = "Y"]; then
Echo "continue ;"Elif [$ YN = "N"]; thenEcho "break ;"ElseEcho "PLS
First, you need to first understand how awk works: 1. Awk reads one row of the input file at a time. 2. For each row, it matches in the given sequence mode. If it matches, the corresponding action is executed. 3. If no pattern match exists, any
In the Linux Shell environment, input and output redirection is supported, expressed by symbols . 0, 1, and 2 indicate the standard input, standard output, and standard error information output, which can be used to specify the standard input or
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