I have a poor understanding of Batch/Bash scripting... 01-20-2013, 06:11 AM
#1
Recently I've been in a... programming-y mood, even though I suck at it. I'm learning Objective-C, and in the book I'm reading about Obj.-C, it mentioned a scripting language for automation of your systems... Well considering that Apple's (Well, NeXT's...) programming environment is very well tied together, I decided I'd learn a bit of AppleScript, I did, but very basic stuff. Nothing really interesting, other than maybe a script that opens every App on someone's Mac
I moved to Batch... but this presented a problem. Batch looks awesome... but I don't have Windows. I think it would be inconvenient to attempt to learn Batch on a Mac where it has no use xD Again, by reading tutorials, even some I found here on HC, I learned how to make loops, variables, and do various things with Batch, and I'd send these out to people I knew via Skype to test them, because I couldn't of course... xD Now, I'm here at Bash (or Bourne? I've seen Bourne mentioned I believe on somethin'-parker.org.), but I'm kind of confused. See, I really just want a scripting language that can perform all of my Terminal commands in order, but I don't really get it and I feel like a n00b. This is what I can do with Bash, right? Or is it a different syntax? I'm not sure, I kind of just got confused as to what Bash does/can do...
\\\ Edit: I went ahead and went to /bin, and I see (on OS X) a bunch of files that I believe are exec's... One says sh, and one says bash. As I'm seeing in the Steve Parker tutorial, I think it's using SH, as I infer from this line of code : $ echo '#!/bin/sh' > my-script.sh All I know is that sh is in the bin folder, and it's mentioned in that line. Again, extremely poor understanding of it all, all help is appreciated.
I moved to Batch... but this presented a problem. Batch looks awesome... but I don't have Windows. I think it would be inconvenient to attempt to learn Batch on a Mac where it has no use xD Again, by reading tutorials, even some I found here on HC, I learned how to make loops, variables, and do various things with Batch, and I'd send these out to people I knew via Skype to test them, because I couldn't of course... xD Now, I'm here at Bash (or Bourne? I've seen Bourne mentioned I believe on somethin'-parker.org.), but I'm kind of confused. See, I really just want a scripting language that can perform all of my Terminal commands in order, but I don't really get it and I feel like a n00b. This is what I can do with Bash, right? Or is it a different syntax? I'm not sure, I kind of just got confused as to what Bash does/can do...\\\ Edit: I went ahead and went to /bin, and I see (on OS X) a bunch of files that I believe are exec's... One says sh, and one says bash. As I'm seeing in the Steve Parker tutorial, I think it's using SH, as I infer from this line of code : $ echo '#!/bin/sh' > my-script.sh All I know is that sh is in the bin folder, and it's mentioned in that line. Again, extremely poor understanding of it all, all help is appreciated.
xevenofhearts


![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)
![[Image: 2YpkRjy.png]](http://i.imgur.com/2YpkRjy.png)
