1 |
On Tue, 29 Mar 2011 17:05:01 -0400 |
2 |
"Aaron W. Swenson" <titanofold@g.o> wrote: |
3 |
|
4 |
> > - Suppressing stdout of commands like "do_action env update" is fine, |
5 |
> > but why suppress stderr? |
6 |
> > |
7 |
> Because 'ls' would complain that files didn't exist, such as lib*.dylib |
8 |
> when on a Linux system. It doesn't matter. But, using 'find' avoids this |
9 |
> mess. |
10 |
|
11 |
Never use ls to get filenames in a script. Instead of |
12 |
|
13 |
for link_source in $(eval ls ${source_dir} 2> /dev/null) ; do |
14 |
|
15 |
just use |
16 |
|
17 |
for link_source in "${source_dir}"/* ; do |
18 |
|
19 |
I see you already fixed this one, but you do some funky stuff with ls -d |
20 |
earlier on. |
21 |
|
22 |
http://mywiki.wooledge.org/BashPitfalls#for_i_in_.24.28ls_.2A.mp3.29 |
23 |
|
24 |
|
25 |
-- |
26 |
fonts, gcc-porting, it makes no sense how it makes no sense |
27 |
toolchain, wxwidgets but i'll take it free anytime |
28 |
@ gentoo.org EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 |