Well in bash/sh the () means execute in a sub-shell. If you redirect or pipe output from one process to a command in a sub-shell it will be redirected or piped (whatever the original was) to the command being executed in the sub-shell.
You can also use $(command) as a command-line variable that will substitute the output of the command during evaluation.
Ie # mkinitrd /boot/initrd-$(uname -r).img $(uname -r)
-Ross
-----Original Message----- From: centos-bounces@centos.org centos-bounces@centos.org To: CentOS mailing list centos@centos.org Sent: Mon Nov 12 17:57:11 2007 Subject: Re: [CentOS] backups and md5 all in one while splitting
Ross S. W. Walker wrote:
'tee' splits the stdin into multiple output streams.
The first instance of tee you listed gave it a file name and a pipe to output the stdout to.
The second instance did a redirection to a sub-shell which then passed it to 'split' and it also had a pipe.
-Ross
How does this sub-shell redirection work? Can someone explain the syntax to me or shoot me a link to a doc somewhere?
Russ
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.