HP-UX 中的脚本无法创建或覆盖文件



我正在尝试在HP-UX 2.7.8上构建libxml2-11ia32,但配置脚本卡在

echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed

我相信这是由于脚本无法创建文件。我假设这是因为它在重新运行脚本时无法覆盖 config.log 文件。我已经三重检查了权限,并且我用 777 对整个文件夹进行了 chmod。

听起来像noclobber. 本手册列出了修改该设置的两种方法:

  % set [{-|+}abCefhkmnopstuvx] [{-|+}o option]...
       [{-|+}A name] [arg]...
       Set (-) or clear (+) execution options or perform array
       assignments (-A, +A).  All options except -A and +A can be
       supplied in a shell invocation (see the SYNOPSIS section and the
       Shell Invocation subsection).
       Using + instead of - before an option causes the option to be
       turned off.  These options can also be used when invoking the
       shell.  The current list of set single-letter options is
       contained in the shell variable -.  It can be examined with the
       command echo $-.
       The - and + options can be intermixed in the same command, except
       that there can be only one -A or +A option.
       Unless -A or +A is specified, the remaining arg arguments are
       assigned consecutively to the positional parameters 1, 2, ....
       The set command with neither arguments nor options displays the
       names and values of all shell parameters on standard output.  See
       also env(1).
...
       -C   Prevent redirection > from truncating existing files.
            Requires >| to truncate a file when turned on.
...
       -o   Set an option argument from the following list.  Repeat the
            -o option to specify additional option arguments.
...
           noclobber      Same as -C.

那是

set +C
set +o noclobber

最新更新