{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/shell-common-tools-reference/",
  "atlas": "https://www.pystone.net/?node=shell-common-tools-reference#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/shell-common-tools-reference.md",
  "context": "https://www.pystone.net/notes/shell-common-tools-reference.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:shell-common-tools-reference",
  "slug": "shell-common-tools-reference",
  "title": "【batshell】常用工具积累",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "【batshell】常用工具积累",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "f636c02e3f2f2e725a2b3318cef3b03f61dfbc5982e3efb6e84a5ead20a6ed6e",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "【batshell】常用工具积累",
      "anchor": "batshell常用工具积累",
      "citation": "https://www.pystone.net/notes/shell-common-tools-reference/#batshell%E5%B8%B8%E7%94%A8%E5%B7%A5%E5%85%B7%E7%A7%AF%E7%B4%AF"
    },
    {
      "depth": 2,
      "text": "拷贝文件并判断是否成功",
      "anchor": "拷贝文件并判断是否成功",
      "citation": "https://www.pystone.net/notes/shell-common-tools-reference/#%E6%8B%B7%E8%B4%9D%E6%96%87%E4%BB%B6%E5%B9%B6%E5%88%A4%E6%96%AD%E6%98%AF%E5%90%A6%E6%88%90%E5%8A%9F"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:software-engineering-and-quality",
      "title": "软件工程与质量保障",
      "url": "https://www.pystone.net/notes/software-engineering-and-quality/",
      "atlas": "https://www.pystone.net/?node=software-engineering-and-quality#knowledge-atlas",
      "label": "软件工程与质量保障",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "CI-CD与质量保障/CI-CD工具链中的“【batshell】常用工具积累”导航项",
      "citation": "https://www.pystone.net/notes/software-engineering-and-quality/#ci-cd%E4%B8%8E%E8%B4%A8%E9%87%8F%E4%BF%9D%E9%9A%9Cci-cd%E5%B7%A5%E5%85%B7%E9%93%BE"
    }
  ],
  "contentMarkdown": "# 【batshell】常用工具积累\n\n﻿# 【bat/shell】常用工具积累\n\n| **创建时间：** | _2021/9/9 11:02_ |\n| --------- | ---------------- |\n\n## 拷贝文件并判断是否成功\n\n```csharp\nstring a = &quot;test&quot;;\nstring tmp = &quot;est&quot;;\nstring b = &quot;t&quot; + tmp;\nConsole.WriteLine(string .ReferenceEquals(str1, str2));\n```\n\n判断参数个数 myapp foo bar ：\n\nshell ：\n2 * -> foo bar\n$0 -> myapp\n$1 -> foo\n$2 -> bar\n\nbat：\n%* -> foo bar\n%0 -> myapp\n%1 -> foo\n%2 -> bar\n\nset argC=0\nfor %%x in (%*) do Set /A argC+=1\n\necho %argC%\n"
}
