X-Authentication-Warning: kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f Date: Thu, 11 Oct 2001 08:57:28 -0500 From: JT Williams To: djgpp AT delorie DOT com Subject: duplicating stdin in shell script Message-ID: <20011011085728.A15517@kendall.sfbr.org> Mail-Followup-To: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Reply-To: djgpp AT delorie DOT com Is it possible/practical to duplicate stdin (without using tmp files) so that it can be scanned twice in a shell script? If so, could someone please show me a shell idiom to do this? For example, suppose I want to scan a tab-delimited text file to determine the maximum width of each field, so I can then pass stdin to `expand' using appropriate options. TIA/jtw