tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: tsh@mrc-lmb.cam.ac.uk
Subject: csh and /tmp
Date: Tue, 07 Jan 2003 18:18:37 +0000 (GMT)	[thread overview]
Message-ID: <200301071818.SAA214316@alf1.mrc-lmb.cam.ac.uk> (raw)

TU64 V5.1 PK4
-------------

Hi all,
We seem to have a csh curiosity here. As documented in the
man pages for csh, if one has a shell script which contains
the << inline input redirection, a temporary file is created
in /tmp containing the inline data, but this file is not
removed when the script completes.

e.g.:

#!/bin/csh -f
#
cat - <<eot
123
456
789
eot

This leaves a file in /tmp with a random name starting with sh


This doesnt happen with tcsh, nor with csh/tcsh on a Linux box.
(Maybe the file is never created, or maybe it's deleted before
I get a chance to see it). It's normally not a problem, (in fact
we only discovered it when /tmp filled up for other reasons),
since there is a cron job which deletes unused /tmp files unaccessed
for a few days, but we occasionally have a burst of jobs using
the << input, which could generate hundreds of thousands of such
files.

Is this a bug or a feature I wonder...

Happy New Year,

Terry.



                 reply	other threads:[~2003-01-07 18:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox