在windows下使用shell,运行shell脚本
2023-09-11 14:19:36 时间
在Windows操作系统下运行Shell脚本,缺少的只是一个Git软件。其下载路径为Git - Downloading Package。
安装之后,将安装路径下的bin文件夹的路径作为环境变量。于是我们就能够在CMD中通过
sh xxx.sh
来运行Shell脚本。
参考:https://zhuanlan.zhihu.com/p/59451678
PS:windows,Git安装路径下的bin文件夹:
PS:3楼评论的小伙伴(谢谢^_^),给出了全路径下调用sh.exe 去运行sh脚本的方案,即:
命令:c:\Program Files\Git\bin\sh.exe E:\devops\oss_backup.sh
和
进入shell命令行,如下进入:
C:\Program Files\Git\bin>bash.exe
Administrator@iZighe9m8ihy8vZ MINGW64 /bin
$ cp
我自己尝试了一下,如下图:
1、windows+R,调出cmd
2、进入shell命令行
3、退出sh命令行,又回到cmd界面
相关文章
- 用 Windows 7 的同学明天就能用 IE10 了
- Windows 7版本IE10浏览器11月中旬推出
- nginx-windows版
- 【shell 脚本】删除 由windows传入linux含有的 ^M
- EasyPlayerPro windows播放器本地配置文件配置方法介绍
- MFC Windows 程序设计[147]之ODBC数据库连接(附源码)
- MFC Windows 程序设计[123]之文件浏览编辑框(附源码)
- MFC Windows 程序设计[七十八]之勾选框列表(附源码)
- OCR - 微软windows 11系统自带的Windows OCR功能初体验
- Windows nc命令下载使用与使用bash建立反弹shell
- MSF制作Windows客户端恶意软件获取SHELL过程
- [转]Windows 下 Apache Virtual hosts 简单配置
- windows server 2008 安装Microsoft ActiveSync 6.1提示缺少一个Windows Mobile设备中心所须要的Windows组件
- Windows下安装RabbitMQ报错:unable to perform an operation on node时的解决方案
- 【错误记录】Windows 控制台程序编译报错 ( WINDOWS.H already included. MFC apps must not #include <Windows.h> )
- [shell]Shell经常使用特殊符号
- chromium在windows上的编译 构建 Checking out and Building Chromium for Windows
- 20.第六章 Shell脚本编程基础入门 -- shell 脚本语言的基本用法(三)
- 18.第六章 Shell脚本编程基础入门 -- 编程基础和shell脚本语言的基本用法(一)
- 【Linux之Shell脚本实战】猜拳小游戏shell脚本
- Windows 10更改计算机名验证名称报错出现“一般性网络错误”对话框
- windows任务设置定时
- crly-shell centos/windows服务器,Mysql数据库表结构损坏
- shell - 07 - Shell文本处理三剑客 - grep
- shell - 09 - Shell文本处理三剑客 - sed -文件内容操作详解