PowerShell命令行外壳和脚本环境
PowerShell 是一个跨平台的 (Windows, Linux 和 OS X) 自动化和配置工具(框架),可以和已有的工具友好集成,特别优化用于处理结构化数据 (如 JSON, CSV, XML 等), REST APIs 以及对象模型。它包含一个命令行 Shell、一个关联的脚本语言以及一个用于处理 cmdlets 的框架。
PowerShell 就相当于 Linux 下的 Bash 以及 SHELL 脚本编程语言。
PowerShell 与 Bash 的对别:
Bash | PowerShell | Description |
---|---|---|
ls | dir, Get-ChildItem | List files and folders |
tree | dir -Recurse | List all files and folders |
cd | cd, Set-Location | Change directory |
pwd | pwd, $pwd, Get-Location | Show working directory |
clear, Ctrl+L, reset | cls, clear | Clear screen |
mkdir | New-Item -ItemType Directory | Create a new folder |
touch test.txt | New-Item -Path test.txt | Create a new empty file |
cat test1.txt test2.txt | Get-Content test1.txt, test2.txt | Display files contents |
cp ./source.txt ./dest/dest.txt | Copy-Item source.txt dest/dest.txt | Copy a file |
cp -r ./source ./dest | Copy-Item ./source ./dest -Recurse | Recursively copy from one folder to another |
mv ./source.txt ./dest/dest.txt | Move-Item ./source.txt ./dest/dest.txt | Move a file to other folder |
rm test.txt | Remove-Item test.txt | Delete a file |
rm -r <folderName> | Remove-Item <folderName> -Recurse | Delete a folder |
find -name build* | Get-ChildItem build* -Recurse | Find a file or folder starting with 'build' |
grep -Rin "sometext" --include="*.cs" | Get-ChildItem -Recurse -Filter *.cs | Select-String -Pattern "sometext" |
Recursively case-insensitive search for text in files |
评论
gfw-toolkit命令行脚本
gfw-toolkit是一组命令行脚本,利用GoogleApps管理SDK。它可以使用简单的Shell脚本或有趣的Python模块来执行简单的命令行指令。
gfw-toolkit命令行脚本
0
posh-git集成 Git 的 PowerShell 脚本
posh-git包含一组强大的PowerShell脚本,提供了Git和PowerShell的集成。
posh-git集成 Git 的 PowerShell 脚本
0
sveinbjornt-Platypus命令行脚本开发工具
Platypus 是一种开发人员工具,可从命令行脚本(如 shell 脚本或 Python、Perl
sveinbjornt-Platypus命令行脚本开发工具
0
sveinbjornt-Platypus命令行脚本开发工具
Platypus 是一种开发人员工具,可从命令行脚本(如shell脚本或Python、Perl、Ruby、Tcl、JavaScript和PHP程序)创建原生Mac应用程序。这是通过将脚本与运行脚本的精
sveinbjornt-Platypus命令行脚本开发工具
0
KitshWebKit 外壳
Kitsh是一个简单的Webkit外壳,提供一个自包容的HTML5浏览器、客户端/服务器的JavaScript处理器以及SQLite数据库。主要用于帮助开发桌面和widgets应用。
KitshWebKit 外壳
0