| delorie.com/archives/browse.cgi | search |
| 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 <jeffw AT darwin DOT sfbr DOT org> |
| 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 |
| 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |