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

时间:2016-03-02 21:57:00

标签: shell unix hp-ux

我正在尝试在HP-UX 11ia32上构建libxml2-2.7.8并且配置脚本停留在

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

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

1 个答案:

答案 0 :(得分:0)

听起来像noclobbermanual列出了两种修改该设置的方法:

  % 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