Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!wrdis01!mcgough From: mcgough@wrdis01.af.mil (Jeffrey B. McGough) Newsgroups: comp.unix.shell Subject: Re: How to read sequentially from a file in SH (not KSH) Message-ID: <510@wrdis01.af.mil> Date: 27 Apr 91 21:06:01 GMT References: <1991Apr27.012336.2732@shibaya.lonestar.org> Organization: 1926CCSG Robins AFB Lines: 32 In article <1991Apr27.012336.2732@shibaya.lonestar.org> afc@shibaya.lonestar.org (Augustine Cano) writes: >SH does not support this (at least not the one I have). I have tried: > >while read VAR1 VAR2 < $FILENAME; do > echo $VAR1 $VAR2 >done This can be done by... #! /bin/sh FILENAME="/foo/bar" while read VAR1 VAR2 do { echo "$VAR1 VAR2" } done < "$FILENAME" Hope this helps... The double quotes are my version of paranoia I user stuff like this for various admin tasks all the time... -- Lator, We cheat the other guy, and pass the savings on to you. Jeffrey B. McGough WR-ALC UNIX Systems Administrator (mcgough@wrdis01.af.mil)