当前位置:网站首页>Assign the CMD command execution result to a variable
Assign the CMD command execution result to a variable
2022-07-03 20:01:00 【yzpyzp】
for example , I hope that git Code commitid Get and add it to the folder to mark which package is in the folder git Node construction .
git The order is git rev-parse --short HEAD
stay linux Under the system , Just execute the following command :
commitid=`git rev-parse --short HEAD`
echo commitid=$commitid
But in windows Under the system , But you can't use single quotation marks directly , To use for Flexible , The order is as follows :
for /F %%i in ('git rev-parse --short HEAD') do ( set commitid=%%i)
echo commitid=%commitid%
Reference resources :
bat/cmd Assign the result of command execution to a variable
The batch reads the second line of text and assigns it to a variable
边栏推荐
- Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
- How to improve data security by renting servers in Hong Kong
- 交叉编译Opencv带Contrib
- Chapter 1: sum of three factorials, graph point scanning
- Chapter 1: extend the same code decimal sum s (D, n)
- unittest框架基本使用
- Typora charges, WTF? Still need support
- Class loading process
- NFT without IPFs and completely on the chain?
- Global and Chinese market of speed limiter 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
5- (4-nitrophenyl) - 10,15,20-triphenylporphyrin ntpph2/ntppzn/ntppmn/ntppfe/ntppni/ntppcu/ntppcd/ntppco and other metal complexes
PR 2021 quick start tutorial, material import and management
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
Chapter 1: King Shehan miscalculated
How to read the source code [debug and observe the source code]
Chapter 1: simplify the same code decimal sum s (D, n)
CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
Chapter 1: sum of three factorials, graph point scanning
BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu
Bright purple crystal meso tetra (4-aminophenyl) porphyrin tapp/tapppt/tappco/tappcd/tappzn/tapppd/tappcu/tappni/tappfe/tappmn metal complex - supplied by Qiyue
随机推荐
Global and Chinese market of speed limiter 2022-2028: Research Report on technology, participants, trends, market size and share
Acquisition and transmission of parameters in automatic testing of JMeter interface
2022 - 06 - 30 networker Advanced (XIV) Routing Policy Matching Tool [ACL, IP prefix list] and policy tool [Filter Policy]
unittest框架基本使用
4. Data splitting of Flink real-time project
Chapitre 1: le roi de shehan a mal calculé
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu
Meso tetra [P - (p-n-carbazole benzylidene imino)] phenylporphyrin (tcipp) /eu (tcipp) [pc( α- 2-oc8h17) 4] and euh (tcipp) [pc (a-2-oc8h17) 4] supplied by Qiyue
Global and Chinese market of full authority digital engine control (FADEC) 2022-2028: Research Report on technology, participants, trends, market size and share
10 smart contract developer tools that miss and lose
2022-06-30 advanced network engineering (XIV) routing strategy - matching tools [ACL, IP prefix list], policy tools [filter policy]
Chapter 1: drinking soft drinks, step tariff calculation, step tariff calculation function, personal income tax, solving square root inequality, simplifying solving square root inequality, solving dem
Chapter 1: simplify the same code decimal sum s (D, n)
6. Data agent object Defineproperty method
Use unique_ PTR forward declaration? [repetition] - forward declaration with unique_ ptr? [duplicate]
How to improve data security by renting servers in Hong Kong
01 - QT OpenGL display OpenGL window
Rd file name conflict when extending a S4 method of some other package
Chapter 2: find the box array, complete number in the specified interval, and improve the complete number in the specified interval