Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Mike Yates
On 11 May 2015 at 20:01, Bastian Bittorf bitt...@bluebottle.com wrote: * Mike Yates x...@fonehelp.co.uk [11.05.2015 18:05]: The command read in Busybox v1.23 functions just like in GNU bash but in the v1.1.1 in my old NAS it keeps complaining of not enough arguments. what is your exact

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Jody Bruchon
On 5/13/2015 7:45 AM, Mike Yates wrote: read -p Enter name: $name I have found that the $ is the issue - Busybox will only accept a variable name without it, while Bash accepts either, or the null variable. My understanding is that BusyBox does not attempt to support Bashisms beyond a certain

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Michael Conrad
On 5/13/2015 7:45 AM, Mike Yates wrote: On 11 May 2015 at 20:01, Bastian Bittorf bitt...@bluebottle.com wrote: * Mike Yates x...@fonehelp.co.uk [11.05.2015 18:05]: The command read in Busybox v1.23 functions just like in GNU bash but in the v1.1.1 in my old NAS it keeps complaining of not

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Jody Bruchon
On 05/13/2015 11:27 AM, Michael Conrad wrote: My bash behaves like busybox. As far as I know it has never been possible to read $foo and get the value placed into $foo (unless $foo=foo) I confirmed that bash on one of my servers does allow use of 'read $foo' instead of 'read foo'. It seems like

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Michael Conrad
On 5/13/2015 11:30 AM, Jody Bruchon wrote: On 05/13/2015 11:27 AM, Michael Conrad wrote: My bash behaves like busybox. As far as I know it has never been possible to read $foo and get the value placed into $foo (unless $foo=foo) I confirmed that bash on one of my servers does allow use of 'read

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Jody Bruchon
On 05/13/2015 1:00 PM, Michael Conrad wrote: while read $foo; do echo $foo; done Does it start writing to an unintended variable on the second iteration? My bash appears to resolve $foo to nothing and puts the response in $REPLY. What's strange is that it is now NOT letting me use 'read