delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/11/13/14:00:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Sven Joachim <svenjoac AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: which: command not found
Date: Sun, 13 Nov 2011 19:46:30 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <87bosf273t.fsf@turtle.gmx.de>
References: <0e66e1f9-6a85-4af8-94b1-2ac490eaf4c2 AT m19g2000vbm DOT googlegroups DOT com>
<4349b255-f8ba-4e1d-93b9-488b173373a9 AT g7g2000vbv DOT googlegroups DOT com>
<83bosqjn0u DOT fsf AT gnu DOT org> <87aa7zapba DOT fsf AT violet DOT siamics DOT net>
<837h33ga8p DOT fsf AT gnu DOT org>
Mime-Version: 1.0
Injection-Info: mx04.eternal-september.org; posting-host="3HGN7FZ2ATpRGTNrkVkXcw";
logging-data="582"; mail-complaints-to="abuse AT eternal-september DOT org"; posting-account="U2FsdGVkX1+qR7n3XnsuSLy8RqkB1UMZ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux)
Cancel-Lock: sha1:jaXGwpYl/tjiSPwiCl4ZoIwzTbs=
sha1:aW3fpvZ9pguN7Ph48mufRvcua+g=
Bytes: 2226
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 2011-11-13 19:15 +0100, Eli Zaretskii wrote:

>> From: Ivan Shmakov <oneingray AT gmail DOT com>
>> 
>>  > Just the last week, I needed to craft my own version of `mktemp'
>>  > because the Texinfo test suite used it.  `mktemp' is part of GNU
>>  > Coreutils,
>> 
>> 	Though it was added somewhat recently:
>> 
>> - --cut: coreutils-8.5/NEWS --
>> * Noteworthy changes in release 6.9.90 (2007-12-01) [beta]
>> 
>> ** New programs
>> 
>> …
>> 
>>   mktemp: create a temporary file or directory (or names)
>> - --cut: coreutils-8.5/NEWS --
>
> That's my point: you need GNU Coreutils to be able to run a test suite
> of an entirely unrelated package.

You can also use the DJGPP port of Todd Miller's mktemp, available in
the v2tk/mktmp*.zip packages.

> How hard is it to create a temporary file/directory in a shell script?

Without using mktemp(1) or some similar utility and sticking to POSIX
commands: very hard, probably impossible.  At least if you want to avoid
the races and symlink attacks that happen with traditional foo$$ files.

Cheers,
       Sven

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019