[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
read built-in will not read inside while loop
From: |
Tony Thedford |
Subject: |
read built-in will not read inside while loop |
Date: |
Mon, 10 Oct 2005 13:58:05 -0500 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051005) |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DC
uname output: Linux tony 2.6.12-gentoo-r10 #14 Thu Sep 29 03:19:53 CDT
2005 i686 AMD Athlon(tm) XP 3000+ AuthenticAMD GNU/Lin
Machine Type: i686-pc-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
Description:
When a 'read -p "line of text."' built-in is placed inside a while loop
which has redirected input to another read built-in, the read command
inside the while loop does not execute. I know this sounds vague, but
see the example and it will make more sense.
Repeat-By:
#!/bin/bash
read -p "hello press a key."
while read a b c ; do
echo $a
read -p "Looping.. press a key." <--- This 'read' will not execute.
echo $b
echo $c
done < <(ls -al ~/)
exit 0
- read built-in will not read inside while loop,
Tony Thedford <=