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
noob shell scripting question
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="mystic_fm" data-source="post: 821959" data-attributes="member: 28538"><p>From the man page for echo(1):</p><p></p><p>"Some shells may provide a built-in echo command which is similar or identical to this utility. Most notably, the built-in echo in sh(1) does NOT accept the -n option. Consult the builtin(1) manual page."</p><p></p><p>You can get the -n option to work if you change to using /bin/bash as the shell rather than /bin/sh (in the first line of your script), or else if you invoke /bin/echo via its explicit path to avoid using the built-in version while continuing to use the standard Bourne shell.</p></blockquote><p></p>
[QUOTE="mystic_fm, post: 821959, member: 28538"] From the man page for echo(1): "Some shells may provide a built-in echo command which is similar or identical to this utility. Most notably, the built-in echo in sh(1) does NOT accept the -n option. Consult the builtin(1) manual page." You can get the -n option to work if you change to using /bin/bash as the shell rather than /bin/sh (in the first line of your script), or else if you invoke /bin/echo via its explicit path to avoid using the built-in version while continuing to use the standard Bourne shell. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
noob shell scripting question
Top