From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18145 invoked by alias); 21 Dec 2016 19:36:28 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22244 Received: (qmail 23748 invoked from network); 21 Dec 2016 19:36:28 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.27):SA:0(-0.7/5.0):. Processed in 1.030146 secs); 21 Dec 2016 19:36:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Hk0uOY0NWEgMgdg qTl0nwOymm04=; b=k77uhpYC6wbnUbF3axkdq9lMZp3W5MtS9lSoAqk1b/RPGp1 cANbB/uTZXYYMPL21HWZPXmTF3kI5akzYV7jBfJg0QfHvDYMIJl5CVdhcoTTlplj /TykBU9kic5JS3hmHC0mnglzwk6hbn1p0+IW4ZNfOBNxKnDKTnLmFQbobysE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Hk0uOY0NWEgMgd gqTl0nwOymm04=; b=cVdnyl4SzPYVG7yOhMQDgNqDgwzxG9ffwpl7WulDkITU9C /vVGl5mSNHR0jHTswp4ygsrf3lEz3Q/7/+DRgjCxzc+M6x4cEdxaIDuOy/W3J0xx I8MfOPyugOFARjwqSYHWDj+vKa+DsKyyQ6ERAgn5Nv3wwopycG8kvReok2Qx0= X-ME-Sender: X-Sasl-enc: MHKl65uTWQStkvDINu9sByG/Eka86qOz3Mb9jYvP1GxL 1482348982 Date: Wed, 21 Dec 2016 19:33:21 +0000 From: Daniel Shahaf To: Ray Andrews Cc: Zsh Users Subject: Re: 32 or 64 Message-ID: <20161221193321.GA24231@fujitsu.shahaf.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Ray Andrews wrote on Wed, Dec 21, 2016 at 11:15:20 -0800: > Now that I have both 32 bit and 64 bit versions of various binaries, whereas > I used to just store them in a /Bin directory which is on my path, now, if > I'm jumping back and forth between 32 bit Debian and 64 bit Debian, whereas > previously different installs could share the same /Bin directory (all being > 32 bit previously) Don't share the /bin directory between OS installs. Doing so is liable to leave one of the two OSes unbootable at some point. That's assuming /bin is on the / partition. if /bin is a symlink to /usr/bin [as seems to be fashionable nowadays] and /usr is its own partition, then sharing that partition can be made to work, with some care. But I don't think that's what you have. > now I hafta be able to distinguish 32 from 64, so I'm > thinking to symlink /Bin to either /Bin32 or /Bin64 and I'm wondering if > there might be a simple way for zsh to make that link for me based on > knowing if either itself, or the kernel is 32 or 64 bit. I could test the > output of 'uname -r' of course, but I'd not be surprised if zsh can do it > more elegantly and robustly than checking for substrings in the kernel name. For future reference, there's `uname -m`. But again: I would recommend just giving each OS its own partition. That's a lot less likely to break. Cheers, Daniel