Windows 下 bat 脚本调用 Git bash 环境 sh 脚本

1、先找到 Git 安装目录

D:\Install\Git


2、Git bash 编写 sh 脚本

start.sh脚本


3、编写 start.bat脚本

bat 复制代码
@echo off

cd /d %~dp0
"D:\Install\Git\bin\sh.exe" --login -i -c "./test/start.sh"

pause

4、执行 bat 脚本

双击 start.bat


我们下期见,拜拜!

相关推荐
网硕互联的小客服25 分钟前
Apache 如何支持SHTML(SSI)的配置方法
运维·服务器·网络·windows·php
etcix35 分钟前
implement copy file content to clipboard on Windows
windows·stm32·单片机
2301_767233221 小时前
Git使用和理解上的一些问题
git
许泽宇的技术分享1 小时前
Windows MCP.Net:基于.NET的Windows桌面自动化MCP服务器深度解析
windows·自动化·.net
非凡ghost2 小时前
AMS PhotoMaster:全方位提升你的照片编辑体验
windows·学习·信息可视化·软件需求
mortimer3 小时前
一次与“顽固”外部程序的艰难交锋:subprocess 调用exe踩坑实录
windows·python·ai编程
gameatp6 小时前
从 Windows 到 Linux 服务器的全自动部署教程(免密登录 + 压缩 + 上传 + 启动)
linux·服务器·windows
穷人小水滴6 小时前
在 windows 运行 flatpak 应用 (WSL)
linux·windows·ubuntu
nyf_unknown9 小时前
(vue)将文件夹打成tar包, Git Bash(推荐)具体使用
vue.js·git·bash
兔老大RabbitMQ9 小时前
Git Revert 特定文件/路径的方法
git