From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 99B221F463 for ; Tue, 24 Dec 2019 12:51:42 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1ijjew-000527-9q; Tue, 24 Dec 2019 12:51:34 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ijjev-000520-8n for sox-users@lists.sourceforge.net; Tue, 24 Dec 2019 12:51:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-ID:References:In-Reply-To:Subject:To:From: Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8v+pe2QjIelfu4EIhSh8qFum1TkjoVh2ZJjeolW+aYw=; b=CB/9fKgl74R/ngdEZl8yuIqTO1 iN4RCKVIaVcUHnWPdLUqGDQ140EGSdOllKa+4kDVDp5lYpyq/APuqko4uNZIgBsbYYn4LipcVZH7Y KHCx4I0zfZbIY62n7VGctuh9TLZ/GTRJmzs3UnjJQsywYHL1KAXIMRm8Uu4Hf/mXTios=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-ID:References:In-Reply-To:Subject:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8v+pe2QjIelfu4EIhSh8qFum1TkjoVh2ZJjeolW+aYw=; b=Bt3MMOop2U/GwGI+Fz78GNT59V OrfwIcfKfNsXdQhcT0+fbOR40+HWtL4IwOWRcS4nA8LOjFo8THRB4UcA0sDGAXBkCVegKmLqOZaGB Y2+kjf9eGlZEQ6jEDp4ihD2VQO3+fP8AdTfLhpdc5H/JOQfHL/0Ek2wXI6560vw1KisI=; Received: from b-painless.mh.aa.net.uk ([81.187.30.52]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1ijjer-00E6Sl-Ih for sox-users@lists.sourceforge.net; Tue, 24 Dec 2019 12:51:33 +0000 Received: from webmailtest.aa.net.uk ([2001:8b0:0:30::66]) by b-painless.mh.aa.net.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ijjeg-0007dd-8M for sox-users@lists.sourceforge.net; Tue, 24 Dec 2019 12:51:18 +0000 Received: from cpc132346-sgyl43-2-0-cust166.know.cable.virginm.net ([82.42.23.167]) by webmailtest.aa.net.uk with HTTP (HTTP/1.1 POST); Tue, 24 Dec 2019 12:51:09 +0000 MIME-Version: 1.0 Date: Tue, 24 Dec 2019 12:51:09 +0000 From: Jeremy Nicoll - ml sox users To: sox-users@lists.sourceforge.net In-Reply-To: References: Message-ID: X-Sender: jn.ml.sxu.88@wingsandbeaks.org.uk User-Agent: Roundcube Webmail/1.3.8 X-Headers-End: 1ijjer-00E6Sl-Ih Subject: Re: Basic questions on SoX for Mac OS X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: sox-users-bounces@lists.sourceforge.net On 2019-12-23 16:29, Matthew Mitcheltree wrote: > I copied the input.dat file to Downloads > sox-14.4.2 as well. > So when I launch terminal, navigate there, and enter "sox input.dat > output.wav," I get the error: > > -bash: sox: command not found > So, maybe I need to install SoX I don't think so. But when you issue a command in the terminal, the command's executable either needs to be in one of the directories that the OS always looks in, when looking for executables, or you explicitly need to tell the OS where the program is. So in simple tutorials about using terminal (which you can find by googling for 'mac terminal') you'll see examples of using eg ls to list the contents of a directory, mv to move files etc... but 'ls' and 'mv' are part of the Mac OS and it already knows how to find those. How? They're in directories which are defined/listed on something called PATH. So, one solution would be to add the Downloads\sox-14.4.2 directory to PATH, so the OS would always look in there when looking for any executable to run. I don't know if that's a good idea though. If you did that with all the command-line programs you download, PATH would be long, and you'd need to keep changing it as you installed or replaced utilities. Still, it's possible. See eg: http://osxdaily.com/2014/08/14/add-new-path-to-path-command-line/ Or, having navigated to the directory that contains the sox executable you should issue a command like: ./sox input.dat output.wav That explicitly tells the OS to run the program it'll find at "./sox" that is, in the current directory. (Dot means 'current directory' so "./abc" means file abc in the current directory.) Some people, I think, explicitly set up PATH so the OS will always look in the current directory (which obviously varies as you navigate around), as well as fixed places (where system commands live), but that also may not be a great idea. It's discussed in https://en.wikipedia.org/wiki/PATH_(variable) Another possibility is that rather than navigating to the directory which contains the sox executable, so you don't bother navigating to it, but instead always say in the command you're issuing where (in absolute/explicit terms) the sox executable is. So instead of sox input... you'd issue eg ~\Downloads\sox-14.4.2\sox input ... (or something. I'm not precisely sure of what the full path to a Mac Downloads directory is). There will be ways (in bash for example) of predefining a shorthand 'alias' for commands so you might be able eg to define 'mysox' as '~\Downloads\sox-14.4.2\sox' and then issue mysox input... from any terminal window without first navigating to the sox directory. See eg: https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html > ... so I wonder whether a "SoX guide for command-line beginners" > would be a welcome addition to the program documentation? None of this is specific to sox; it applies to every command-line program. The approach you take wil depend on what you think suits you best, for all command-line programs. On Windows, I adopt the approach of always putting the full path to sox (or any other utility program I use) into the command. It means I can have different versions of the command-line programs installed and always know which one I'm using. -- Jeremy Nicoll - my opinions are my own _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users