python - 有没有办法将 Powershell、Python 脚本转换为 Bash 脚本?
问题描述
我为 Windows 操作系统开发了多个 PowerShell 脚本
检查内存利用率更改服务状态检索用户信息。
我想为 Linux 和 Mac OS 开发相同的脚本,有什么办法可以使用现有的 powershell 脚本。
解决方案
您可能会发现此链接很有帮助:
https://www.phillipsj.net/posts/using-powershell-scripts-from-bash
它为您提供了有关如何安装 powershell 的指南,然后提供了一些有关如何在 bash 中运行 powershell 脚本的示例。
推荐阅读
- reactjs - React Typescript 中的非标准属性
- asp.net-core - 在混合路由场景中哪个路由器首先处理传入请求
- vb.net - 如何将datagridview中的数据导出到文本文件并导入VB.net
- java - 如何使用 java 从 Alfresco Server 下载文件?
- java - RxJava:如何刷新固定大小的缓冲区
- python - 如何运行在后台处理文件的 Python 函数?
- amazon-web-services - 无法下载 aws s3 冰川对象
- laravel - Laravel 唯一验证在验证时必须包含附加文本
- machine-learning - 机器学习过拟合是如何工作的
- dart - 如何将实例的构造函数作为类型传递给函数