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
Bash shell scripting in OS X
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="IvanLasston" data-source="post: 1419605" data-attributes="member: 145676"><p>The script is usually the same - where I've run into problems is in the options available between the different tools - as you said vansmith. What I tend to do is google both the linux and osx commands. So I google</p><p>[code]</p><p>man ls mac</p><p>man ls</p><p>man find</p><p>man find mac</p><p>[/code]</p><p>All in different windows of course. The man/mac google should drop you into the developer man pages that I linked to before. The straight man - should find you a standard linux man page. You'll see that some of the built in commands do not match up in arguments. So if you do something like ls with options and dump that into a file to manipulate - you may get an error saying that option doesn't exist. (this is also why dircolor may bite you) Just an example</p><p></p><p>find command</p><p><a href="https://developer.apple.com/" target="_blank">https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/find.1.html</a></p><p>UNIX man pages : find () (outdated link removed)</p><p></p><p>ls command</p><p><a href="https://developer.apple.com/" target="_blank">Loading…</a></p><p>UNIX man pages : ls () (outdated link removed)</p></blockquote><p></p>
[QUOTE="IvanLasston, post: 1419605, member: 145676"] The script is usually the same - where I've run into problems is in the options available between the different tools - as you said vansmith. What I tend to do is google both the linux and osx commands. So I google [code] man ls mac man ls man find man find mac [/code] All in different windows of course. The man/mac google should drop you into the developer man pages that I linked to before. The straight man - should find you a standard linux man page. You'll see that some of the built in commands do not match up in arguments. So if you do something like ls with options and dump that into a file to manipulate - you may get an error saying that option doesn't exist. (this is also why dircolor may bite you) Just an example find command [URL='https://developer.apple.com/']https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/find.1.html[/URL] UNIX man pages : find () (outdated link removed) ls command [URL='https://developer.apple.com/']Loading…[/URL] UNIX man pages : ls () (outdated link removed) [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Bash shell scripting in OS X
Top