* [gentoo-user] Broken 3D
@ 2009-10-07 16:49 James
2009-10-07 19:26 ` [gentoo-user] " walt
` (3 more replies)
0 siblings, 4 replies; 22+ messages in thread
From: James @ 2009-10-07 16:49 UTC (permalink / raw
To: gentoo-user
Hello,
bzflag will not run....
I'm using ati-drivers (9.9-r2) on an AMD64 system.
xdriinfo says?
Xlib: extension "XFree86-DRI" missing on
display ":0.0"
Screen 0: not direct rendering capable.
Wnen I recompile ati-drivers I get this:
snip
Found sources for kernel version:
2.6.30-gentoo-r4
You have DRM support built in to the kernel
Direct rendering will not work.
I usally aways put my video driver stuff into
the kernel, not as a module......
also
bash: glxgears: command not found
So in all of the upgrading, edit of xorg.conf
and new kernels, I took what was working
and munged up the 3d on this system:
ATI Technologies Inc RV710 [Radeon HD 4350]
I have ran this also:
emerge -1 ati-drivers xf86-input-evdev xf86-input-joystick
xf86-input-keyboard xf86-input-mouse xf86-video-fbdev
Any suggestions or clarification are most welcome.
James
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: Broken 3D
2009-10-07 16:49 [gentoo-user] Broken 3D James
@ 2009-10-07 19:26 ` walt
2009-10-07 19:30 ` [gentoo-user] " James Ausmus
` (2 subsequent siblings)
3 siblings, 0 replies; 22+ messages in thread
From: walt @ 2009-10-07 19:26 UTC (permalink / raw
To: gentoo-user
On 10/07/2009 09:49 AM, James wrote:
> Hello,
>
> bash: glxgears: command not found
I can't help with the driver, but glxgears is in the mesa-progs package.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Broken 3D
2009-10-07 16:49 [gentoo-user] Broken 3D James
2009-10-07 19:26 ` [gentoo-user] " walt
@ 2009-10-07 19:30 ` James Ausmus
2009-10-07 21:22 ` Volker Armin Hemmann
2009-10-08 3:38 ` Jesús Guerrero
3 siblings, 0 replies; 22+ messages in thread
From: James Ausmus @ 2009-10-07 19:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
On Wed, Oct 7, 2009 at 9:49 AM, James <wireless@tampabay.rr.com> wrote:
> Hello,
>
> bzflag will not run....
>
<snip>
> Any suggestions or clarification are most welcome.
>
<snip>
Can you send your /var/log/Xorg.0.log file?
-James
[-- Attachment #2: Type: text/html, Size: 704 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Broken 3D
2009-10-07 16:49 [gentoo-user] Broken 3D James
2009-10-07 19:26 ` [gentoo-user] " walt
2009-10-07 19:30 ` [gentoo-user] " James Ausmus
@ 2009-10-07 21:22 ` Volker Armin Hemmann
2009-10-08 3:38 ` Jesús Guerrero
3 siblings, 0 replies; 22+ messages in thread
From: Volker Armin Hemmann @ 2009-10-07 21:22 UTC (permalink / raw
To: gentoo-user
On Mittwoch 07 Oktober 2009, James wrote:
> Any suggestions or clarification are most welcome.
yes, remove that drm stuff from your kernel as you are told in the error
message. Compile&install kernel, install ati-drivers, reboot.
Geez - the error tells you exactly the problem!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Broken 3D
2009-10-07 16:49 [gentoo-user] Broken 3D James
` (2 preceding siblings ...)
2009-10-07 21:22 ` Volker Armin Hemmann
@ 2009-10-08 3:38 ` Jesús Guerrero
2009-10-08 15:28 ` [gentoo-user] Re: FIXED 3D James
3 siblings, 1 reply; 22+ messages in thread
From: Jesús Guerrero @ 2009-10-08 3:38 UTC (permalink / raw
To: gentoo-user
On Wed, 7 Oct 2009 16:49:41 +0000 (UTC), James <wireless@tampabay.rr.com>
wrote:
> Hello,
>
> bzflag will not run....
>
> I'm using ati-drivers (9.9-r2) on an AMD64 system.
>
> xdriinfo says?
>
> Xlib: extension "XFree86-DRI" missing on
> display ":0.0"
> Screen 0: not direct rendering capable.
>
>
> Wnen I recompile ati-drivers I get this:
>
> snip
> Found sources for kernel version:
> 2.6.30-gentoo-r4
> You have DRM support built in to the kernel
> Direct rendering will not work.
>
>
> I usally aways put my video driver stuff into
> the kernel, not as a module......
You can't since you want to use ati-driver/fglrx. The fglrx is not part of
the kernel, it's only shipped in the form of a binary-only closed source
kernel module. fglrx doesn't need (and most likely will fail as you see)
the in-kernel radeon drm driver. So, either disable radeon AND drm in your
kernel, or build them as modules and make sure that they are not loaded
before you try to load fglrx.
--
Jesús Guerrero
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 3:38 ` Jesús Guerrero
@ 2009-10-08 15:28 ` James
2009-10-08 15:35 ` Jesús Guerrero
2009-10-08 15:54 ` Nikos Chantziaras
0 siblings, 2 replies; 22+ messages in thread
From: James @ 2009-10-08 15:28 UTC (permalink / raw
To: gentoo-user
Jesús Guerrero <i92guboj <at> terra.es> writes:
> You can't since you want to use ati-driver/fglrx. The fglrx is not part of
> the kernel, it's only shipped in the form of a binary-only closed source
> kernel module. fglrx doesn't need (and most likely will fail as you see)
> the in-kernel radeon drm driver. So, either disable radeon AND drm in your
> kernel, or build them as modules and make sure that they are not loaded
> before you try to load fglrx.
As usually Volker was right. Thanks for this explanation....
With a mixture of open sourced and ati-driver systems,
sometimes I get confused...... or careless.
One final question. When I run this command:
emerge -1 $(qlist -I x11-drivers)
I get this error:
'x11-drivers/ati-drivers' is not a valid package atom
Please check ebuild(5) for full details.
yet 'emerge x11-drivers/ati-drivers'
works fine as a one line command....
Is this a bug? My bad (syntax)?
James
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 15:28 ` [gentoo-user] Re: FIXED 3D James
@ 2009-10-08 15:35 ` Jesús Guerrero
2009-10-08 15:53 ` James
2009-10-08 15:54 ` Nikos Chantziaras
1 sibling, 1 reply; 22+ messages in thread
From: Jesús Guerrero @ 2009-10-08 15:35 UTC (permalink / raw
To: gentoo-user
On Thu, 8 Oct 2009 15:28:12 +0000 (UTC), James <wireless@tampabay.rr.com>
wrote:
> Jesús Guerrero <i92guboj <at> terra.es> writes:
>
>
>> You can't since you want to use ati-driver/fglrx. The fglrx is not part
>> of
>> the kernel, it's only shipped in the form of a binary-only closed
source
>> kernel module. fglrx doesn't need (and most likely will fail as you
see)
>> the in-kernel radeon drm driver. So, either disable radeon AND drm in
>> your
>> kernel, or build them as modules and make sure that they are not loaded
>> before you try to load fglrx.
>
>
> As usually Volker was right. Thanks for this explanation....
> With a mixture of open sourced and ati-driver systems,
> sometimes I get confused...... or careless.
>
>
> One final question. When I run this command:
> emerge -1 $(qlist -I x11-drivers)
>
> I get this error:
> 'x11-drivers/ati-drivers' is not a valid package atom
> Please check ebuild(5) for full details.
>
>
> yet 'emerge x11-drivers/ati-drivers'
> works fine as a one line command....
>
>
> Is this a bug? My bad (syntax)?
Probably the colors screwing everything, as always. Try searching the
qlist man page for something like --nocolor or --color=never.
--
Jesús Guerrero
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 15:35 ` Jesús Guerrero
@ 2009-10-08 15:53 ` James
0 siblings, 0 replies; 22+ messages in thread
From: James @ 2009-10-08 15:53 UTC (permalink / raw
To: gentoo-user
Jesús Guerrero <i92guboj <at> terra.es> writes:
> Probably the colors screwing everything, as always. Try searching the
> qlist man page for something like --nocolor or --color=never.
Yep:
emerge -1 $(qlist -IC x11-drivers)
works just fine....
thx....
James
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 15:28 ` [gentoo-user] Re: FIXED 3D James
2009-10-08 15:35 ` Jesús Guerrero
@ 2009-10-08 15:54 ` Nikos Chantziaras
2009-10-08 18:33 ` Neil Bothwick
1 sibling, 1 reply; 22+ messages in thread
From: Nikos Chantziaras @ 2009-10-08 15:54 UTC (permalink / raw
To: gentoo-user
On 10/08/2009 06:28 PM, James wrote:
> One final question. When I run this command:
> emerge -1 $(qlist -I x11-drivers)
>
> I get this error:
> 'x11-drivers/ati-drivers' is not a valid package atom
> Please check ebuild(5) for full details.
Try: emerge -1 $(qlist -I x11-drivers)
And it's usually quicker to type with backticks instead of $():
emerge -1 `qlist -IC x11-drivers`
Note: not single-quotes ('), but backticks (`). It's usually the key
above TAB and to the left of 1.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 15:54 ` Nikos Chantziaras
@ 2009-10-08 18:33 ` Neil Bothwick
2009-10-08 19:14 ` Alan McKinnon
` (3 more replies)
0 siblings, 4 replies; 22+ messages in thread
From: Neil Bothwick @ 2009-10-08 18:33 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote:
> And it's usually quicker to type with backticks instead of $():
But nowhere near as clear.
> Note: not single-quotes ('), but backticks (`). It's usually the key
> above TAB and to the left of 1.
I rest my case :)
Note you can also nest commands when using $(), which you can't do with
backticks.
--
Neil Bothwick
Beware! The end is... <aaarrgh!>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 18:33 ` Neil Bothwick
@ 2009-10-08 19:14 ` Alan McKinnon
2009-10-08 19:19 ` James Ausmus
2009-10-09 16:12 ` Alex Schuster
2009-10-08 19:34 ` Nikos Chantziaras
` (2 subsequent siblings)
3 siblings, 2 replies; 22+ messages in thread
From: Alan McKinnon @ 2009-10-08 19:14 UTC (permalink / raw
To: gentoo-user; +Cc: Neil Bothwick
On Thursday 08 October 2009 20:33:01 Neil Bothwick wrote:
> On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote:
> > And it's usually quicker to type with backticks instead of $():
>
> But nowhere near as clear.
And it's quicker to type "$(" - muscle memory - than to do the whole hunt-
peek-peck thing to find the ` key - I can't touch type it, have to *look* for
it
:-)
> > Note: not single-quotes ('), but backticks (`). It's usually the key
> > above TAB and to the left of 1.
>
> I rest my case :)
>
> Note you can also nest commands when using $(), which you can't do with
> backticks.
That's neat. But,
please provide an example where an actual sane human would actually use it.
Coz I can't think of one...
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 19:14 ` Alan McKinnon
@ 2009-10-08 19:19 ` James Ausmus
2009-10-08 19:27 ` Nikos Chantziaras
2009-10-09 16:12 ` Alex Schuster
1 sibling, 1 reply; 22+ messages in thread
From: James Ausmus @ 2009-10-08 19:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]
On Thu, Oct 8, 2009 at 12:14 PM, Alan McKinnon <alan.mckinnon@gmail.com>wrote:
> On Thursday 08 October 2009 20:33:01 Neil Bothwick wrote:
> > On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote:
> > > And it's usually quicker to type with backticks instead of $():
> >
> > But nowhere near as clear.
>
> And it's quicker to type "$(" - muscle memory - than to do the whole hunt-
> peek-peck thing to find the ` key - I can't touch type it, have to *look*
> for
> it
>
> :-)
>
> > > Note: not single-quotes ('), but backticks (`). It's usually the key
> > > above TAB and to the left of 1.
> >
> > I rest my case :)
> >
> > Note you can also nest commands when using $(), which you can't do with
> > backticks.
>
> That's neat. But,
>
> please provide an example where an actual sane human would actually use it.
> Coz I can't think of one...
>
>
I've used it before - I can't remember what is was for, but I do remember
using nested $() commands...
Isn't ` being deprecated (by BASH at least) anyway?
-James
> --
> alan dot mckinnon at gmail dot com
>
>
[-- Attachment #2: Type: text/html, Size: 1823 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 19:19 ` James Ausmus
@ 2009-10-08 19:27 ` Nikos Chantziaras
2009-10-08 20:02 ` Alan McKinnon
0 siblings, 1 reply; 22+ messages in thread
From: Nikos Chantziaras @ 2009-10-08 19:27 UTC (permalink / raw
To: gentoo-user
On 10/08/2009 10:19 PM, James Ausmus wrote:
> I've used it before - I can't remember what is was for, but I do
> remember using nested $() commands...
>
> Isn't ` being deprecated (by BASH at least) anyway?
Hopefully not! It's just two key presses to type "``". "$()" takes 4
(shift+4+9, command, shift+0).
What's easier than simply pressing one single key? :-/
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 18:33 ` Neil Bothwick
2009-10-08 19:14 ` Alan McKinnon
@ 2009-10-08 19:34 ` Nikos Chantziaras
2009-10-08 21:21 ` Neil Bothwick
2009-10-08 22:43 ` Jesús Guerrero
2009-10-09 2:22 ` Jonathan Callen
3 siblings, 1 reply; 22+ messages in thread
From: Nikos Chantziaras @ 2009-10-08 19:34 UTC (permalink / raw
To: gentoo-user
On 10/08/2009 09:33 PM, Neil Bothwick wrote:
> On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote:
>
>> And it's usually quicker to type with backticks instead of $():
>
> But nowhere near as clear.
>
>> Note: not single-quotes ('), but backticks (`). It's usually the key
>> above TAB and to the left of 1.
>
> I rest my case :)
Why? It's one single key. Easy to remember. Nothing is easier than
one key instead of needing shift+4-shift+9 to produce "$(" :P
> Note you can also nest commands when using $(), which you can't do with
> backticks.
You can, but that is awkward (echo `echo \`echo \\\`ls\\\`\``). But for
a single, not-nested command, `` is lighting fast to type.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 19:27 ` Nikos Chantziaras
@ 2009-10-08 20:02 ` Alan McKinnon
2009-10-08 20:09 ` Nikos Chantziaras
0 siblings, 1 reply; 22+ messages in thread
From: Alan McKinnon @ 2009-10-08 20:02 UTC (permalink / raw
To: gentoo-user; +Cc: Nikos Chantziaras
On Thursday 08 October 2009 21:27:57 Nikos Chantziaras wrote:
> On 10/08/2009 10:19 PM, James Ausmus wrote:
> > I've used it before - I can't remember what is was for, but I do
> > remember using nested $() commands...
> >
> > Isn't ` being deprecated (by BASH at least) anyway?
>
> Hopefully not! It's just two key presses to type "``". "$()" takes 4
> (shift+4+9, command, shift+0).
$() is more consistent with other syntax elements in bash, It's essentially
the same thing as evaluating a variable and inserting it's value. The ``
syntax is a wild anachronism from days long ago that is completely at odds
with everything else in the shell. Well, you can say that about many things in
bash, but that's not a good reason to not fix anything...
IIRC correctly it's not really deprecated either - that implies the thing will
go away some time. It's more "strongly advised not to use it"
>
> What's easier than simply pressing one single key? :-/
Ummm, not having to look for it and find it first before pressing it? How
about a keyboard that doesn't have it at all?
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 20:02 ` Alan McKinnon
@ 2009-10-08 20:09 ` Nikos Chantziaras
0 siblings, 0 replies; 22+ messages in thread
From: Nikos Chantziaras @ 2009-10-08 20:09 UTC (permalink / raw
To: alan.mckinnon; +Cc: gentoo-user
On 10/08/2009 11:02 PM, Alan McKinnon wrote:
> On Thursday 08 October 2009 21:27:57 Nikos Chantziaras wrote:
>> On 10/08/2009 10:19 PM, James Ausmus wrote:
>>> I've used it before - I can't remember what is was for, but I do
>>> remember using nested $() commands...
>>>
>>> Isn't ` being deprecated (by BASH at least) anyway?
>>
>> Hopefully not! It's just two key presses to type "``". "$()" takes 4
>> (shift+4+9, command, shift+0).
>
> $() is more consistent with other syntax elements in bash, It's essentially
> the same thing as evaluating a variable and inserting it's value. The ``
> syntax is a wild anachronism from days long ago that is completely at odds
> with everything else in the shell. Well, you can say that about many things in
> bash, but that's not a good reason to not fix anything...
>
> IIRC correctly it's not really deprecated either - that implies the thing will
> go away some time. It's more "strongly advised not to use it"
I think you're confusing script usage vs interactive CLI usage.
>> What's easier than simply pressing one single key? :-/
>
> Ummm, not having to look for it and find it first before pressing it?
That's true for every key. But I bet you learned how to do shift+4 to
get an $, right? Well, it's much easier to learn how to press ` to get
an... ` ;)
> How about a keyboard that doesn't have it at all?
Don't know, I've never saw one.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 19:34 ` Nikos Chantziaras
@ 2009-10-08 21:21 ` Neil Bothwick
0 siblings, 0 replies; 22+ messages in thread
From: Neil Bothwick @ 2009-10-08 21:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
On Thu, 08 Oct 2009 22:34:37 +0300, Nikos Chantziaras wrote:
> >> And it's usually quicker to type with backticks instead of $():
> >
> > But nowhere near as clear.
> >
> >> Note: not single-quotes ('), but backticks (`). It's usually the key
> >> above TAB and to the left of 1.
> >
> > I rest my case :)
>
> Why? It's one single key. Easy to remember. Nothing is easier than
> one key instead of needing shift+4-shift+9 to produce "$(" :P
>
But not as clear as stated above. I've lost count of the number of times
someone has posted a command, on this list or elsewhere, that uses
backticks, then had to explain what backticks are after the other person
used single quotes, not noticing the difference. You even had to explain
it yourself here, which took a lot more than an extra three keystrokes.
I'm not saying don't use backticks, I occasionally use them myself,
although I tend to automatically use $( these days, but using them on a
mailing list only causes confusion.
--
Neil Bothwick
This tagline SHAREWARE. Send .
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 18:33 ` Neil Bothwick
2009-10-08 19:14 ` Alan McKinnon
2009-10-08 19:34 ` Nikos Chantziaras
@ 2009-10-08 22:43 ` Jesús Guerrero
2009-10-09 2:22 ` Jonathan Callen
3 siblings, 0 replies; 22+ messages in thread
From: Jesús Guerrero @ 2009-10-08 22:43 UTC (permalink / raw
To: gentoo-user
On Thu, 8 Oct 2009 19:33:01 +0100, Neil Bothwick <neil@digimed.co.uk>
wrote:
> On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote:
>
>> And it's usually quicker to type with backticks instead of $():
>
> But nowhere near as clear.
>
>> Note: not single-quotes ('), but backticks (`). It's usually the key
>> above TAB and to the left of 1.
>
> I rest my case :)
>
> Note you can also nest commands when using $(), which you can't do with
> backticks.
Note also that some languages and keyboard layouts don't favor the use of
the backticks for this case. In Spanish keyboards, this characters: `´^¨
are dead keys (I think that's the correct term, not 100% sure), which means
they don't print anything until you press another key. That means that to
write `foo` I have to actually type `[space]foo`[space], or at least
``foo`` (press the key twice). An in any case it's just a matter of tastes.
Besides that, $() is far clearer, and it allows you to do things like this:
echo $(ls -l $(which tar))
Just an useless example. That, you can't do with backticks.
--
Jesús Guerrero
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: FIXED 3D
2009-10-08 18:33 ` Neil Bothwick
` (2 preceding siblings ...)
2009-10-08 22:43 ` Jesús Guerrero
@ 2009-10-09 2:22 ` Jonathan Callen
2009-10-09 2:56 ` Jesús Guerrero
2009-10-09 8:13 ` Neil Bothwick
3 siblings, 2 replies; 22+ messages in thread
From: Jonathan Callen @ 2009-10-09 2:22 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Neil Bothwick wrote:
> Note you can also nest commands when using $(), which you can't do with
> backticks.
You can nest commands with ``, it's just less intuitive; each of the
following are equivalent:
echo $(echo $(echo $(echo $(echo foo))))
echo $(echo $(echo $(echo `echo foo`)))
echo $(echo $(echo `echo \`echo foo\``))
echo $(echo `echo \`echo \\\`echo foo\\\`\``)
echo `echo \`echo \\\`echo \\\\\\\`echo foo\\\\\\\`\\\`\``
Yes, that is a *lot* of backslashes in the last one, which is why no one
nests that far with `` (personally, I always use $() instead of ``, but
that's mainly because I switched my escape for GNU screen from ^A to `).
- --
Jonathan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrOnkwACgkQOypDUo0oQOqo4QCaA5iPSgyefVeK/clv3Tmb4bZh
QHcAnRbc/wufJ7NZlVfy7f3sACQm1ZoY
=ewZb
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-09 2:22 ` Jonathan Callen
@ 2009-10-09 2:56 ` Jesús Guerrero
2009-10-09 8:13 ` Neil Bothwick
1 sibling, 0 replies; 22+ messages in thread
From: Jesús Guerrero @ 2009-10-09 2:56 UTC (permalink / raw
To: gentoo-user
On Thu, 08 Oct 2009 22:22:05 -0400, Jonathan Callen <abcd@gentoo.org>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Neil Bothwick wrote:
>> Note you can also nest commands when using $(), which you can't do with
>> backticks.
>
> You can nest commands with ``, it's just less intuitive; each of the
> following are equivalent:
Thank for calling my attention on that.
Yes, I know how it works. I rather meant that you can't nest the backticks
in a vanilla fashion, like with $(). Escaping the ticks you can do whatever
you want, it's just a matter of making sure the right thing reaches the
correct depth in a nested chain of shells, since each time that this kind
of substitution it happens in a new subshell.
$ pgrep bash | wc -l
6
$ echo $(pgrep bash | wc -l)
7
$ echo $(echo $(pgrep bash | wc -l))
8
I'll admit I didn't express it in the clearest way. However, this doesn't
solve the fact of the accents being dead keys in a lost (most?) languages
with a Latin alphabet, but English, nor the problem about the clarity
(though that's less an issue when you are working in command line, most
times anyway). I have no idea if the accent is a standard character in
every keyboard layout, so I am not sure that that is a valid argument on
any sane keyboard. I just checked and that accent is even part of the 7 bit
ascii table (dec 96), which is as minimal as you can get nowadays unless we
are speaking about some exotic embedded stuff or ancient device of the
caverns, and in that case, probably the same could apply to $, and even ()
:P
--
Jesús Guerrero
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-09 2:22 ` Jonathan Callen
2009-10-09 2:56 ` Jesús Guerrero
@ 2009-10-09 8:13 ` Neil Bothwick
1 sibling, 0 replies; 22+ messages in thread
From: Neil Bothwick @ 2009-10-09 8:13 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 08 Oct 2009 22:22:05 -0400, Jonathan Callen wrote:
> that's mainly because I switched my escape for GNU screen from ^A to `
That's a good idea, as I use ` a lot less than Ctrl-A I may do the same.
Then I'll have to override years opf muscle memory...
- --
Neil Bothwick
SCORE! Monkeys: one. Humans: zero.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)
iEYEARECAAYFAkrO8KcACgkQum4al0N1GQOLQgCgomOE3LYWvnI4cMIYL2kNJe1Z
9FgAoJpYk6iVj0AYRVEXD0WV99qzvywB
=9yCA
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: FIXED 3D
2009-10-08 19:14 ` Alan McKinnon
2009-10-08 19:19 ` James Ausmus
@ 2009-10-09 16:12 ` Alex Schuster
1 sibling, 0 replies; 22+ messages in thread
From: Alex Schuster @ 2009-10-09 16:12 UTC (permalink / raw
To: gentoo-user
Alan McKinnon writes:
> On Thursday 08 October 2009 20:33:01 Neil Bothwick wrote:
> > On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote:
> > > And it's usually quicker to type with backticks instead of $():
> >
> > But nowhere near as clear.
>
> And it's quicker to type "$(" - muscle memory - than to do the whole
> hunt- peek-peck thing to find the ` key - I can't touch type it, have
> to *look* for it
Uh...
> :-)
... okay :) I for myself was happy when I learnt that $() exists, and
prefer it over the backticks notation. Although it's more to type. But it
looks better, and I want my scripts to look good.
> > Note you can also nest commands when using $(), which you can't do
> > with backticks.
>
> That's neat. But,
>
> please provide an example where an actual sane human would actually use
> it. Coz I can't think of one...
Hey, I'm doing this all the time in my scripts. First example I found is
this, but there are many more:
total=$( mydf -2 "$dir" )
format=$( printf "%%%dd" $( echo $total | wc -c ) )
log 0 " Total: %s MB\n" "$( printf "$format" "$total" )"
log 0 " Used: %s MB\n" "$( printf "$format" "$( mydf -3 "$dir" )" )"
log 0 " Free: %s MB\n" "$( printf "$format" "$( mydf -4 "$dir" )" )"
That was before I knew about ${#total}, so in fact no nesting would be
required in line 2.
I think I also had tree levels of nesting somewhere, but that was too much
fpr Nedit's syntax highlighting, so I de-nested this a little.
Wonko the Sane
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2009-10-09 16:13 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 16:49 [gentoo-user] Broken 3D James
2009-10-07 19:26 ` [gentoo-user] " walt
2009-10-07 19:30 ` [gentoo-user] " James Ausmus
2009-10-07 21:22 ` Volker Armin Hemmann
2009-10-08 3:38 ` Jesús Guerrero
2009-10-08 15:28 ` [gentoo-user] Re: FIXED 3D James
2009-10-08 15:35 ` Jesús Guerrero
2009-10-08 15:53 ` James
2009-10-08 15:54 ` Nikos Chantziaras
2009-10-08 18:33 ` Neil Bothwick
2009-10-08 19:14 ` Alan McKinnon
2009-10-08 19:19 ` James Ausmus
2009-10-08 19:27 ` Nikos Chantziaras
2009-10-08 20:02 ` Alan McKinnon
2009-10-08 20:09 ` Nikos Chantziaras
2009-10-09 16:12 ` Alex Schuster
2009-10-08 19:34 ` Nikos Chantziaras
2009-10-08 21:21 ` Neil Bothwick
2009-10-08 22:43 ` Jesús Guerrero
2009-10-09 2:22 ` Jonathan Callen
2009-10-09 2:56 ` Jesús Guerrero
2009-10-09 8:13 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox