Gentoo Archives: gentoo-project

From: Steve Long <slong@××××××××××××××××××.uk>
To: gentoo-project@l.g.o
Subject: [gentoo-project] Re: New developer: Ron Gemeinhardt (timebandit)
Date: Fri, 26 Sep 2008 08:49:10
Message-Id: gbi7l5$mc5$1@ger.gmane.org
In Reply to: Re: [gentoo-project] New developer: Ron Gemeinhardt (timebandit) by Nirbheek Chauhan
1 Nirbheek Chauhan wrote:
2
3 > On Mon, Sep 22, 2008 at 6:22 PM, Denis Dupeyron <calchan@g.o>
4 > wrote:
5 >> I'm pleased to introduce Ron Gemeinhardt (timebandit) as a new Gentoo
6 >> developer. Ron will be a moderator with the forums team.
7 >
8 > Congrats, Ron, welcome and all that :-)
9 >
10 Welcome to the madhouse Ron :D
11
12 >> Ron is an electrical engineer in theory and a software architect in
13 >> practice. Having been in the IT business for more than 25 years
14 Yay, an old-timer! Excellent :-)
15
16 >> he has
17 >> extensive knowledge of $(for ACRONYM in "${LinkedIn}"; do echo -n "
18 >> ${ACRONYM},"; done). This also automatically gives him access to the
19 > [...]
20 >> PS. The first one who comments about a comma at the end of the script
21 >> output above gets a free review with me. First-class care guaranteed.
22 >
23 > Actually, your fail was more than that.
24 >
25 Tsk I thought you were better-mannered bheekling ;p
26
27 > If "LinkedIn" were a variable, then
28 >
29 > $(for ACRONYM in ${LinkedIn}; do echo -n "${ACRONYM},"; done)
30 >
31 > elif "LinkedIn" were an array, then
32 >
33 > $(for ACRONYM in "${LinkedIn[@]}"; do echo -n "${ACRONYM},"; done)
34 >
35 > Also, the extra comma can be fixed by doing the following:
36 >
37 > $(for ACRONYM in ${LinkedIn}; do echo -en "${ACRONYM},"; done; echo -ne
38 > '\b')
39 >
40 Now that *is* fail ;-)
41
42 > So, where's my free review? ;p
43 >
44 isArr LinkedIn || LinkedIn=($LinkedIn)
45 oIFS=$IFS
46 IFS=, # This line and next are what you should
47 echo "${LinkedIn[*]}" # be aware of. cf: /msg greybot $@
48 IFS=$oIFS
49
50 (We just do: declare -r oIFS=$IFS
51 ..at the start of our scripts, as it makes life easier in the long-run.)

Replies

Subject Author
Re: [gentoo-project] Re: New developer: Ron Gemeinhardt (timebandit) Nirbheek Chauhan <nirbheek.chauhan@×××××.com>