Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Help with a simple script
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dgcrane" data-source="post: 1525645" data-attributes="member: 306529"><p>Hello,</p><p></p><p>I am having my first experience with a Mac for a media server I am trying to set up. Its going very well so far and working 98.5 % of the way I hoped for but I am hoping for some help with the last little bit.</p><p></p><p>I have been trying to make my first shell script to do what I am doing manually in the terminal. I assumed it could be like a bat file and just click on it and it would execute my three little lines <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>#!/bin/bash</p><p>export USEPADEVICE="XMOS USB 2.0 Audio Out"</p><p>export USEPAMAXSAMPLERATE=192000</p><p>open ~/Applications/SqueezePlay.app</p><p>exit</p><p></p><p>I am running a headless 10.6.8 and I have saved these lines a file called SqueezePlay.sh under my home directory. </p><p></p><p>Obviously, I got some problems, cause instead of executing, I get this :</p><p>Last login: Thu Jul 11 15:43:03 on ttys000</p><p></p><p>mac-mini:~ gena_mak$ ./SqueezePlay</p><p>./SqueezePlay: line 1: {rtf1ansiansicpg1252cocoartf1038cocoasubrtf360: command not found</p><p>./SqueezePlay: line 2: syntax error near unexpected token `}'</p><p>./SqueezePlay: line 2: `{\fonttbl\f0\fswiss\fcharset0 Helvetica;}' </p><p></p><p>I tried putting the same information into an applescript and that didn't work out very well either LOL</p><p></p><p>Thanks for any guidance you could give...</p><p></p><p>Darren</p></blockquote><p></p>
[QUOTE="dgcrane, post: 1525645, member: 306529"] Hello, I am having my first experience with a Mac for a media server I am trying to set up. Its going very well so far and working 98.5 % of the way I hoped for but I am hoping for some help with the last little bit. I have been trying to make my first shell script to do what I am doing manually in the terminal. I assumed it could be like a bat file and just click on it and it would execute my three little lines :) #!/bin/bash export USEPADEVICE="XMOS USB 2.0 Audio Out" export USEPAMAXSAMPLERATE=192000 open ~/Applications/SqueezePlay.app exit I am running a headless 10.6.8 and I have saved these lines a file called SqueezePlay.sh under my home directory. Obviously, I got some problems, cause instead of executing, I get this : Last login: Thu Jul 11 15:43:03 on ttys000 mac-mini:~ gena_mak$ ./SqueezePlay ./SqueezePlay: line 1: {rtf1ansiansicpg1252cocoartf1038cocoasubrtf360: command not found ./SqueezePlay: line 2: syntax error near unexpected token `}' ./SqueezePlay: line 2: `{\fonttbl\f0\fswiss\fcharset0 Helvetica;}' I tried putting the same information into an applescript and that didn't work out very well either LOL Thanks for any guidance you could give... Darren [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Help with a simple script
Top