Shell programming tips

This note is based on the built-in shellcontrol of Delphi 7Source codeAnalysis, read a lot of MFC implementation class Explorer Shell controls, BCG, cjlib, but do not have Delphi shell control perfect, for example, tshelllistview can automatically

Shell -- loop for & while & util

1 For Loops Structure: For ARG in [LIST] Do Command (s )... Done #! /Bin/bashsum = 0for int in 1 2 3 4 5do sum = 'expr $ sum + $ int 'doneecho $ sum 2 while Determine whether the condition is met at the beginning of the

BASH Shell braces Extension

  Zhou haihan/Wen 2010.6.10   BASH Shell extension refers to an operation in which Shell expands commands when analyzing input commands. There are 7 extension methods. Refer to the man bash extension page: Expansion the command line extension is

Shell Summary of special variables: Location variables $1, $ *, $?

$1 indicates the first parameter. $ * indicates all parameters entered by the user. The hello1 script is as follows. A location parameter is acceptable. #! /Bin/bash Echo $1   Run the Script:./hello1 "Hello World" and output Hello World on the

Shell Summary: Select expressions and for Loops

The Select expression is a bash extension application, especially for interactive use. You can select from a group of different values.Select VaR in...; doBreakDone... Now $ VaR can be used ....The following is an example:#! /Bin/shEcho "What is

An instance that uses shell to implement automatic FTP

#! /Bin/bashEchoEcho "cintel FTP test tool"# Echo "Please input hostip: \ c"# Read hostip# Echo "Please input Username: \ c"# Read Username# Echo "Please input password: \ c"# Read PasswordRead hostip Username PasswordFTP-n Open $ hostipUser $

Windows shell programming

Download an e-book in chm format:Http://download.csdn.net/source/2843130   Note: I did not write this book. I just compiled it into an e-book for your convenience.   A good definition of an operating system shell is that it is a user interface

Shell: Monitoring script

Introduction: for some programs that need to run for a long time (such as server programs), it is necessary to write a monitoring program to enable automatic restart upon unexpected exit. This function can be implemented through a simple shell

In the vbs script, folder traversal is used in the middle, and regular matching is performed. Several methods of wscript. Shell object are used.

This script only satisfies part of the work I want to complete, and the rest of the content must be completed and debugged in the company. Script running requires the following conditions: Ctags.exe in the same directory as the script requires

Shell: How to Use the find command

Original article: Http://www.cnblogs.com/serendipity/articles/2133385.html Http://linux.chinaunix.net/techdoc/develop/2007/08/21/965951.shtml I. Find Command Format 1. The common form of the find command is;Find pathname-options [-print-Exec-OK...]

Linux Shell: ls and File Permissions

This is an entry-level article. If you are already a shell expert, please kindly advise, 3ku! I recently used Linux Shell in an entire android project ??????!! Fortunately, I have only written some simple shells before, and I have read a lot of

Differences between for and while in Shell

Find out the difference between for and while, and write out the memo. Script: File =/home/hadoop/phrases.txt for content in 'cat $ {file} 'Do phrase = 'echo $ {content}' echo $ phrasedone The phrases.txt file contains the following content:

About the font of the dialog box-MS shell DLG

  VC's default font is Ms shell DLG (8), and Ms shell DLG itself is not a font (refer to: http://poxi.bokee.com/957883.html), just a font ing. Take Chinese Windows XP platform as an example, MS shell DLG (8) is (9.5 ). The ing font can be specified

Linux bash shell learning notes

1. Bash script parameter Processing Bash parameters can be accessed by adding a numerical number to $, where: $ # Indicates the number of Script Parameters $1 indicates the script's 1st parameters. $2 represents the 2nd parameters of the

Shell operation shfileoperation

Shell file operation functionsShfileoperationFunction:1. Copy one or more files2. delete one or more3. Rename the file4. Move one or more files The same WIN32API function is:Copyfile (), deletefile (), movefile ()Movefile can be renamed!Win32 API

Linux IP proxy filtering system (shell + proxy)

In the previous blog, I introduced the Linux Web page capture instance. In this example, the proxy server is used to capture webpages outside of Google Play. Proxy Purpose In fact, in addition to capturing foreign web pages, IP proxy is required,

Shell string inclusion

# Method 1-- Character comparison #!/bin/bashstr1="hello"str2="he"str3="lo"if [ ${str1:0:2} = $str2 ]; then echo "$str1 include $str2"fiif [ ${str1:2:4} = $str3 ]then echo "$str1 include $str3"else echo "$str1 not include $str3"fi Running

Use other users to execute scripts in shell scripts

2. In some software installation processes, you need to create an independent user and then run some installation operations such as gitolite installation, create a git user and execute the installation. Method 1:sudo -u user ... Sudo-u Git-H

Detailed explanation of grep COMMANDS IN SHELL

Use 'grep' to search for text files If you want to find a string in several text files, you can use the 'grep' command. 'Grep' searches for the specified string in the text. For example, if you are searching for a file with the string 'Magic 'in the'

ADB shell dumpsys command to view memory

The memory of the android program is divided into two parts: Native and Dalvik. Dalvik is the Java heap we usually call. The objects we create are allocated here, bitmap is directly allocated on native. The memory limit is that native + Dalvik

Total Pages: 541 1 .... 329 330 331 332 333 .... 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.