Hello again,
Peter Kruse wrote:
Xun Sun wrote:
On 1/12/06, Peter Kruse <[EMAIL PROTECTED]> wrote:
( exportfs ; cat /proc/fs/nfs/exports ) | grep -q "^${export_dir}[ ]"
I guess it's a shell specific behavior. If you are using Bash, I would
suggest removing the subshell construct.
but using a pipe already creates a subshell, doesn't it?
But if I replace above with this:
{ ${exportfs} ; cat /proc/fs/nfs/exports ; } | grep -q "^${export_dir}[ ]"
I still get the same error. Only if do like this:
cat /proc/fs/nfs/exports | grep -q "^${export_dir}[ ]"
the error goes away.
The same error with these:
grep -q "^${export_dir}[ ]" < <( $exportfs ; cat /proc/fs/nfs/exports )
and
show_exports() {
$exportfs
cat /proc/fs/nfs/exports
}
show_exports | grep -q "^${export_dir}[ ]"
why?
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/