[GTALUG] Command doesn't work in script but works on command line?

Dave Collier-Brown dave.collier-brown at indexexchange.com
Sat Nov 6 09:20:09 EDT 2021


Does it perhaps only apply in the process that issues the command?  That would make it apply when run from the command-line, and (appear to) fail when you run it in a subshell, which is what happens when you call a script.

The man page doesn't say, so try making it a shell function,

alsa_me() {

    alsa_out -j secondInterface -d hw:3 -c 6


}

and then call that from the command-line.

--dave


On 2021-11-06 08:44, Jim Ruxton via talk wrote:
Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery?

Jim

On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:


I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?

Did you specify the full path to the command in the script?
---
Post to this mailing list talk at gtalug.org<mailto:talk at gtalug.org>
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
---
Post to this mailing list talk at gtalug.org<mailto:talk at gtalug.org>
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

--
David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
dave.collier-brown at indexexchange.com<mailto:dave.collier-brown at indexexchange.com> |              -- Mark Twain


CONFIDENTIALITY NOTICE AND DISCLAIMER : This telecommunication, including any and all attachments, contains confidential information intended only for the person(s) to whom it is addressed. Any dissemination, distribution, copying or disclosure is strictly prohibited and is not a waiver of confidentiality. If you have received this telecommunication in error, please notify the sender immediately by return electronic mail and delete the message from your inbox and deleted items folders. This telecommunication does not constitute an express or implied agreement to conduct transactions by electronic means, nor does it constitute a contract offer, a contract amendment or an acceptance of a contract offer. Contract terms contained in this telecommunication are subject to legal review and the completion of formal documentation and are not binding until same is confirmed in writing and has been signed by an authorized signatory.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20211106/96761ad5/attachment.html>


More information about the talk mailing list