Use environment variables in makefile and Shell

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

Bashdb debug shell scripts

  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

Collect notes about Linux Shell

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

Summary of scattered shell usage

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

Simple shell command redirection

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,

Printf and shell touch

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

Introduction to shell built-in command Exec

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 syntax

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

[Shell script learning] script task 7.18-7.21

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

Shell script learning: Step-by-step program selects stream and Regular Expression

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

Shell loop, judgment introduction, and instance

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

Unix shell and if Parameters

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)

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

Java command execution (CMD, shell)

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

Shell script Test

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

What about Linux (13) -- shell programming

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

Shell script example

1. Mainly use awk to process two files Number = 0If [-F Level _ $ number. 'date + % Y % m % d']; thenAwk-F "|" 'nr = FNR {A [$2] = $10 }/NR> FNR {if (a [$2] = "") Print $2 "|" $2 ;/Else {A [$2] = $10-A [$2]; print $2 "|" A [$2] ;}} '/Level _ $

Shell in makefile

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 common system variables and shell command line parameters

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

Shell starts another script for statistics. awk adds the current time in each row

Control script, Stat. Sh PID_NUM=$$PID_FILE=stat.pid#echo "pid : "$PID_NUMPROG_NAME=$0ACTION=$1usage() { echo "Usage: ${PROG_NAME} {start|stop|restart}" exit 1;}start(){ sh ./stat_run.sh & PID_NUM=$! echo "worker pid is " $PID_NUM

Total Pages: 541 1 .... 485 486 487 488 489 .... 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.