help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quote interpretation via vars without eval


From: Koichi Murase
Subject: Re: quote interpretation via vars without eval
Date: Tue, 16 Mar 2021 02:59:29 +0800

2021年3月16日(火) 2:33 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>:
> we got too many major misunderstandings about 'styles' and learnt by 
> computers im sure and not sure
> i read many wrong misleadings, so i suggest we switch or detail topic
>
> cd /tmp ; >$'\1' ; find $'\1'
> ./?
>
> very not useable i didnt know i thought it splits by newlines as irc 
> propagates seems me not all IFS=$'\n' may work or so ..

Ah, OK. If you use Bash 4.4+, you can combine «find -print0 ...» and
«mapfile -d '' ...» for the workaround of both $'\1' and $'\n'. For
example,

$ mapfile -t -d '' dirs < <(find . -type d -print0)
$ mapfile -t -d '' files < <(find . ! -type d -print0)

--
Koichi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]