【发布时间】:2015-09-11 04:14:37
【问题描述】:
我安装了 Cygwin 来编译和运行 C 程序。我正在尝试使用 Notepad++ 作为我的编辑器来编写我自己的 shell 程序。当我从命令行(使用 nppexec)执行编译的 .exe 文件时,它在 Cygwin 环境之外运行。
以下重定向命令将无法使用 Window 的 cmd 运行:
$ sort -r < test3.txt
-rThe system cannot find the file specified.
但是当程序通过 Cygwin 的 Mintty 执行时可以工作:
$ sort -r < test3.txt
test3.txt
test.txt
sh.exe
sh.c
1.txt
我正在使用以下代码运行 nppexec 来启动程序:
cd $(CURRENT_DIRECTORY)
gcc "$(FILE_NAME)" -o $(NAME_PART).exe
cmd.exe /c start cmd /k $(NAME_PART).exe
如何编辑以上内容以在 Cygwin 环境中启动?
我试过没有运气:
cmd /c start mintty ./$(NAME_PART).exe
【问题讨论】: