How (or why) does this bash script snippet work?

Cameron Simpson cs at
Fri Jan 13 02:55:27 UTC 2012

On 12Jan2012 20:34, Mark LaPierre <marklapier at> wrote:
| or you could do:
| nodevs=`fgrep rootfs /proc/filesystems`
| The only problem is that putting the command inside ticks launches a
| child process that consumes additional resources.

Shrug. So does:

  nodevs=$(fgrep rootfs /proc/filesystems)


  <foo command [args...]

form is handy for programmatically constructed pipelines, too.

Cameron Simpson <cs at> DoD#743

When in doubt, gas it. It may not solve the problem, but it ends the suspense.
        - Steve Moonitz (92 Ducati 900ss) <stevem at>

More information about the users mailing list