---
title: "【batshell】常用工具积累"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/shell-common-tools-reference/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/03-软件工程与质量保障/CI-CD与质量保障/CI-CD工具链/【batshell】常用工具积累.md"
content_hash: f636c02e3f2f2e725a2b3318cef3b03f61dfbc5982e3efb6e84a5ead20a6ed6e
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 【batshell】常用工具积累

﻿# 【bat/shell】常用工具积累

| **创建时间：** | _2021/9/9 11:02_ |
| --------- | ---------------- |

## 拷贝文件并判断是否成功

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));
```

判断参数个数 myapp foo bar ：

shell ：
2 * -> foo bar
$0 -> myapp
$1 -> foo
$2 -> bar

bat：
%* -> foo bar
%0 -> myapp
%1 -> foo
%2 -> bar

set argC=0
for %%x in (%*) do Set /A argC+=1

echo %argC%
