bash - 找到(1): "Parameter format not correct" under CygWin

标签 bash shell command-line cygwin

我正在尝试从源代码构建 Bochs。因此,我写了一个配置脚本。我没有从头开始编写脚本 - 它基于 Bochs tarball 中的 .conf.win32-vcpp sh 脚本。导致问题的脚本部分是原始 Nochs tarball 没有任何变化 - 我没有写那部分。

我的问题:

每次执行 sh 脚本时,都会出现以下错误:

[...]
config.status: creating host/linux/pcidev/Makefile
config.status: creating config.h
config.status: creating ltdlconf.h
config.status: ltdlconf.h is unchanged
FIND: Parameterformat falsch

*(Parameterformat falsch 表示参数格式不正确)

但是我不需要执行大厅脚本。摩擦片段就足够了:

sh-4.1$ find -name Makefile
FIND: Parameterformat falsch

*(Parameterformat falsch 表示参数格式不正确)

我的问题:

  • 那个脚本片段有什么问题:find 。 -名称生成文件?有什么想法吗?
  • 如何重写这部分代码以使其正常工作?

我的脚本:

#!/bin/sh

set echo

./configure --target=pentium-windows \
            --enable-sb16 \
            --enable-ne2000 \
            --enable-all-optimizations \
            --enable-cpu-level=6 \
            --enable-x86-64 \
            --enable-pci \
            --enable-clgd54xx \
            --enable-usb \
            --enable-usb-ohci \
            --enable-show-ips \
            --enable-disasm \
            --enable-iodebug \
            --enable-logging \
            --enable-debugger-gui \
            --disable-readline \
            --without-x \
            --with-win32 \
            --with-rfb \
            --with-nogui \
            --with-wx

unset echo

# Fix up all makefiles so that nmake can handle them.

--> 狗被埋的地方:

for i in `find . -name Makefile`; do
  echo Removing curly brackets in $i for NMAKE.
  mv $i $i.tmp
  sed -e 's/{/(/g' -e 's/}/)/g' < $i.tmp > $i
  rm -f $i.tmp
done

我的环境:

我不知道这是否重要,但我没有使用普通的 bash。我使用 cygwinsh 命令 (Win64) 提供的 shell。

谢谢。

最佳答案

确保您的 Cygwin 安装包括 findutils 包,并且 Cygwin 的 find 在您的 PATH 中位于第一个(在 native Windows 之前) .

如果 find --help 返回 FIND: Paramater format not correct(或您本地化的等效项),这是 Windows 版本的明确标志,而不是Cygwin 一个,目前正在使用中。

关于bash - 找到(1): "Parameter format not correct" under CygWin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10839568/

相关文章:

python - 在 Mac OSX 10.6.8 上安全地从 usr/local/bin 中删除程序?

bash - Unix命令生成带四位小数的四位随机数

具有特定名称范围的 Bash 列表文件

bash - 如何在 bash 中执行 HTTP PUT?

bash - cat `bash` 命令的意外输出

linux - Shell-fu 列出目录中包含单词或短语实例的所有文件

regex - 如何在 bash 中删除从开始到某个特定选定单词的文本?

android - 通过USB连接检查USB调试状态

bash - 在 Bash 中,如何在字符串中插入 $(...)?

ios - 无法从命令行在模拟器上安装和运行 iOS 应用程序 - 小牛上的 iOS 6.1 Xcode 5 模拟器