-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 cpu memhd wrote:
|> _null="/dev/null 2>&1" |> |> if mount.back $pkgname $pkgmnt > $_null ; then |> lrcfg.back.script $pkgname ON ON Full |> umount $pkgmnt > $_null |> else |> echo "Could not mount backup device." |> sleep 2 |> fi | | | You know, I realized you can't put redirection in a variable this way a | long time ago, don't know where my head was. Might there be some other | way to do this? Use eval (and be careful with your quoting! Bonus points for explaining why the output redirect below has to be in the quotes, but the input redirect can't): _null=">/dev/null 2>&1" eval "cat $_null" <<EOF ~ This goes to the bit-bucket! EOF But why not just use the mechanism *ALREADY* in place for discarding output, the 'qt' (or Quiet) function: <from /bin/POSIXness> qt () { "$@" >/dev/null 2>&1 ; } ...and it's friend, qte (swallows error out, but leaves main out alone): qte () { "$@" 2>/dev/null ; } Use it like so: if qt mount.back $pkgname $pkgmnt ; then - -- Charles Steinkuehler [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCzXQKLywbqEHdNFwRAqKaAJ9h/Jspt54mZevtxizKVro3l636/gCfWjCT 5KeaTA+iLAjusD107Bh+b6E= =BPSN -----END PGP SIGNATURE----- ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ------------------------------------------------------------------------ leaf-user mailing list: leaf-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-user Support Request -- http://leaf-project.org/