Variables can be used in makefile by $ (VAR) or $ {var}. For details, refer:
Http://blog.csdn.net/lovetangtang/archive/2005/12/31/567297.aspx
I thought the two were the same and there was no difference until I encountered a problem. Because of
Recently, I started to learn bash shell. I don't know where to start, and I don't know any good tool packages to learn it. First look:
Yao @ wuyao :~ $ Apt-cache search bashApparix-console-based bookmark tool for Fast File System
1 history
The history command lists used commands. the user's history command is stored in the. bash_history file in the user's home directory.
491 sync 492 logout 493 go-m3 494 logout 495 go-m3 496 go_m3 497 ll 498 ll bin/499 go-m3
Run the 495
Shell is widely used during this period of employment. There are some scattered points, which should be noted here.
If
The IF usage in Shell differs greatly from that in C. It is generally used in combination with [] (currently I only used this
It took me a bit to write this evening. It started with argv, which is a two-digit array.ProgramIt is always not displayed. later it was found that execvp only supports pointer array =. = Okay ....Program idea: After the sub-process is enabled,
Formatting: printf'print format' actual contentWhat are the characters represented by the value 45?Printf'/x45/N' Note:/xnn is a two-digit number, which can be converted into characters.
Introduction to SED and awk tools:You can analyze the
Shell built-in command Exec
Shell's built-in command exec is very interesting. It will not start a new shell, but will replace the current shell process with the command to be executed, and clean up the environment of the old process.
Other
Shell scripts are similar to the C language and also have a fixed language format. in short, shell scripts are like batch processing files (. BAT), the most basic function is to write a lot of commands together, so that users can easily execute a
Write a script:1. Create a directory/tmp/scripts2. Switch the working directory to this directory.3. Copy the/etc/PAM. d directory to the current directory and run the test command again.4. Change the owner of test and its files and subdirectories
Like other programming languages, shell scripts provide if esle, do while, for, case, and so on for program execution streams. Like other programming languages, the existence of the shell script program execution flow is to establish a complete
There are three main types of shell loops: For, while, and.
There are two main types of shell Branch judgment: If and case.
1. For Loop
#! /Bin/bashfor file in $ (LS/tmp/test/mytest | grep SH) // For in is the basic format of Shell, the for in root
Source Address: http://space.itpub.net/10687260/viewspace-293440
[-A file] true if the file exists.W (g3cu. T * mb7q6a0[-B file] If the file exists and is a special block file, it is true.S8ydayx 'gi0[-C file] If the file exists and is a special
Unix shell programming (2)
Character matchingThe asterisk (*) matches more than 0 characters, and the question mark (?) Match 1 character.For example:Ls [A-Z] * [0-9]Displays the list of objects whose names start with lowercase letters and end
A simple tool that uses Java to execute system commands and print the output.
Public class osexecute {/** * command. * Description: * * none. * @ Param command */ Public static void command (string command) { try { Process = new
The AAA. Log content of the file to be processed:
09/26 00:00:08 116.41834259033203 39.90071597768346 116.60888671875 35.3890499669116709/26 00:01:34 121.13089397549632 30.98941357306606 121.55966117978099 31.14988029343771409/26 00:01:51 117.1238332
Before writing an article, I want to know what shell programming is and what is the difference between shell programming and C/C ++ programming?
I understand that shell programming is to use Linux operating commands to program according to certain
Extract a section in makefile that calls shell.
Install:-If [! -E xxx]; then sudo mkdir xxx; FI
Note: To write the above if statement to a row, you must add a semicolon before fi; otherwise, the following error will occur.Unexpected end of File
The
UNIX System Variables$? The return code of the previous command or function.$ # Number of parameters$, $0 is the program body, from $1, $2, $3 is the parameter$ * String: saves all parameters in the form of "parameter 1 parameter 2 ..."$ @ String
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