试图在Windows批处理文件中运行cygwin命令,但是,cygwin命令仅到达cygwin交互式提示。
@echo off
C:
chdir C:\cygwin\bin
bash --login -i
split -l 1 test.txt
logoff
exit
仅到达cygwin / linux的命令界面command prompt reached
使用bash --login -i
时,请输入交互式bash shell。
您需要的是:
bash -c "cd /path/to/your-test-txt; split -l 1 test.txt"