Gentoo Archives: gentoo-user

From: lee <lee@××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: xterm menu
Date: Mon, 19 Dec 2016 20:56:57
Message-Id: 87inqfzls8.fsf@heimdali.yagibdah.de
In Reply to: [gentoo-user] Re: xterm menu by Ian Zimmerman
1 Ian Zimmerman <itz@×××××××.net> writes:
2
3 > On 2016-12-19 19:46, lee wrote:
4 >
5 >> perl -e 'print "$_\n" foreach(split(/,/,
6 >> "/usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/OTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins"));'
7 >> | xargs ls
8 >
9 >> That brings up the question if there is some alternative to perls split
10 >> in coreutils or bash. The split of coreutils appears to be supposed to
11 >> be doing something rather useless?
12 >
13 > [5+0]~$ FOO='foo,bar,baz'
14 > [6+0]~$ printf '%s\n' `echo $FOO | tr ',' ' '`
15 > foo
16 > bar
17 > baz
18
19 Nice, thanks!
20
21 echo "/usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/OTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins" | tr ',' "\n"
22
23
24 I never realised there's printf and always wondered why I needed man 3
25 ...
26
27 Hm. Does anyone know when printf was written? The man page seems to be
28 wrong:
29
30
31 [~] printf --version
32 bash: printf: --: invalid option
33 printf: usage: printf [-v var] format [arguments]
34 [~]

Replies

Subject Author
[gentoo-user] Re: xterm menu Ian Zimmerman <itz@×××××××.net>