On Sat, 1 Feb 2003 17:37:56 +0100 martin f krafft wrote: > Right. But I gave up on it when I fough 30 minutes this morning on > reading in a file formatted like this: > > <user>\s+<filename>
I take it you mean that each line is composed of two words, separated by one or more spaces, and terminated with a newline. Both words will, of course, contain no spaces. > while read user filename; do > echo "$user : $filename" > done < thefile I cut and pasted this code of yours with *no* modifications, and it ran perfectly under bash. No tinkering with IFS or anything else. > this is supposed to work, but for whetever reason, it didn't this > morning, and would put everything into $user and leave $filename > blank. of course I checked $IFS. of course i did everything to debug. > i couldn't find the solution. so i gave up. I've had issues like this with shell scripting, and I always came out of them a lot smarter and with a lot more respect for the shell. Please mail me a copy of your 'thefile' (less any confidential info), I would really like to debug this issue. -- Carlos Sousa http://vbc.dyndns.org/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]