Re: inconsistent readonly error behavior

2020-12-22 Thread Oğuz
22 Aralık 2020 Salı tarihinde Travis Everett yazdı: > I don't understand what distinction you're trying to make; any example you > can give? > > I added an extra near-copy of the script to the gist replacing the > assignment with unset (https://gist.github.com/abathur/ >

Re: inconsistent readonly error behavior

2020-12-22 Thread Travis Everett
I don't understand what distinction you're trying to make; any example you can give? I added an extra near-copy of the script to the gist replacing the assignment with unset ( https://gist.github.com/abathur/8d18853e06f2a8cf3a97e45acda17f68#file-unset-sh-console), and corresponding output where

Re: while loops can not read "\"

2020-12-22 Thread Ilkka Virta
Arguably it's a bug that 'help read' doesn't mention the effect of backslashes, other than what can be extrapolated from the description of -r. It only says "The line is split into fields _as with word splitting_", but word splitting doesn't recognize backslashes as special. It should not be

Re: while loops can not read "\"

2020-12-22 Thread Greg Wooledge
On Tue, Dec 22, 2020 at 04:18:39PM +0800, ffvh gfff wrote: > command line: > cat poc.txt | while read i; do echo $i;done > it can not read "\" You forgot to use the -r option in your read command.

Re: While and for loops can read all filename when poc.txt have "*"

2020-12-22 Thread
(With apologies to the poster as I accidentally commented off-list ...) On 22/12/2020 07:42, ffvh gfff wrote: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat > -Werror=format-security -Wall > uname output: Linux kali

Re: while loops can not read "\"

2020-12-22 Thread
On 22/12/2020 08:18, ffvh gfff wrote: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux kali 5.7.0-kali1-amd64 #1 SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux Machine Type:

Re: While and for loops can read all filename when poc.txt have "*"

2020-12-22 Thread Greg Wooledge
On Tue, Dec 22, 2020 at 03:42:46PM +0800, ffvh gfff wrote: > for i in $(cat ~/poc.txt);do echo $i;done https://mywiki.wooledge.org/DontReadLinesWithFor https://mywiki.wooledge.org/BashFAQ/001 https://mywiki.wooledge.org/BashPitfalls$pf1

while loops can not read "\"

2020-12-22 Thread ffvh gfff
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux kali 5.7.0-kali1-amd64 #1 SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 Patch