Linux Shell practical programming record

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 =

CMD or shell read terminal port

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

Double and single horizontal bars in Shell Parameters

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

Notes for Unix Bourne shell

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

Shell special Variables

$ # 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

Linux Shell web page capture

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]

Shell calls window commands to interact with each other

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

'$ {B-2}' and '$ {B:-2}' in Shell }"

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

(Peanut shell) sunflower-related Virtual Hardware (driver) causes the XP system to fail to stand and sleep normally

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

Shell script for log analysis

#! /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 ###

Meaning of "2> & 1" in Linux Shell

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

Linux Shell programming syntax

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

Shell batch rename

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

Java calls Shell

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

Linux Shell skills

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

Shell script: how to use shell environment variables in awk

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

Ubuntu9.04 shell programming [: 10: Y: Unexpected Operator

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

Usage of awk print in Shell

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

Shell Output Control

1. Obtain the coordinates of the current cursor Declare-I lnum = 0Getlnum (){Echo-ne '/E [6n'; read-SDR POSPos =$ {pos #*[}Lnum =$ {pos % ;*}Col =$ {pos ##*;}}   2. control output Format: Echo "/033 [text background color; font color M string/033 [0

Linux Shell script output redirection

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

Total Pages: 541 1 .... 529 530 531 532 533 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.