[FFmpeg-devel] [PATCH V4 1/2] configure: sort decoder/encoder/filter/... names in alphabet order

Guo, Yejun yejun.guo at intel.com
Wed Apr 24 13:39:02 EEST 2019



> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
> avih
> Sent: Wednesday, April 24, 2019 5:22 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V4 1/2] configure: sort
> decoder/encoder/filter/... names in alphabet order
> 
> > No. It expands at `echo` because you didn't quote `$inputs`.
> I meant the at the line `echo $inputs`. The shell expands it before it
> executes `echo`. `echo` (or any other command) will get the expanded value,
> which with `*` is all files in the current working directory which don't
> begin with a dot (`.`).
> 
> 
>     On Wednesday, April 24, 2019 12:08 PM, avih <avihpit at yahoo.com>
> wrote:
> 
> 
>  > btw, I tried read as following, looks that read also expands '*':
> > print_in_columns() {
> >     read inputs
> >     echo $inputs
> > }
> 
> No. It expands at `echo` because you didn't quote `$inputs`.
> 
> As I commented on your v4 part 2 patch, you _must_ quote all strings unless
> you know for a fact that it's not required, or that you very intentionally
> want it unquoted and aware of the potential side effects. The rule of thumb
> is to quote all values.
> 
> Quoting is the most fundamental subject with shell - scripting or otherwise.

thanks, will remember. I also realized it might be the possible reason when I was on bus just now.

> 
> Because even though it looks like a programming language with variables,
> programming constructs etc, ultimately a shell is a very glorified string
> processor. Everything in shell is strings, and interpreting strings is
> a multi-level process which is not trivial to grasp, and where quoting is
> an essential part.
> 
> You would do well to invest time to understand it as best as you can.
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list