Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!ncis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!labrea!rutgers!tut.cis.ohio-state.edu!osu-cis!att!ihlpf!lukas From: lukas@ihlpf.ATT.COM (00771g-Lukas) Newsgroups: comp.unix.questions Subject: Re: Line at a time scripts in csh Message-ID: <7296@ihlpf.ATT.COM> Date: 18 Jan 89 14:22:52 GMT References: <4116@paris.ics.uci.edu> <909@ubu.warwick.UUCP> Reply-To: lukas@ihlpf.UUCP (00771g-Lukas,J.) Organization: AT&T Network Systems - Lisle Illinois Lines: 29 In article <4116@paris.ics.uci.edu> posert@bonnie.ics.uci.edu (Bob Posert) writes: > >I have a file with two words on each line, and want to >process them in a shell script, but can't figure out >how to get *the entire line* into a variable. Nobody mentioned IFS, so I thought Id through my $.02 in. The following will I think solve the problem: ifs_def=$IFS ifs_nl="\ " while read in; do echo "$in" # other stuff IFS="$ifs_nl" done