You also asked for a website resource. I feel this site is pretty venerable:
http://www.shelldorado.com/

I'm sure there are many bourne *again* specific resources out there but I
only have experience with pure sh (actually Almquist* *sh)

Specific features that bash might give you that can't be expressed inside
ruby( if any) should be launched with the bash interpreter... though if you
get that far you may want to reevaluate your program.

You can get path and other info from ENV

of course ruby programs can be launched inside your #!/bin/sh scripts and as
I pointed out the other way around.

Also following the Unix philosophy: *Write programs that do one thing and do
it well. Write programs to work together. Write programs to handle text
streams, because that is a universal interface.*

And my philosophy: AUTOMATE EVERYTHING =)

happy hacking!

On Sat, Nov 27, 2010 at 1:43 PM, Stu <stu / rubyprogrammer.net> wrote:
> backticks work very well as well and are in the bourne scripting
> metaphor. Interpolation (i.e. #{self} will also work inside ruby's
> back ticks.
>
> They will return string. to be used within the program. pipes and
> redirection can be used inside as so:
>
> ps = "$2"
> pid =  `ps aux | awk '{print #{ps}}'`
> printf pid
>
> $$ gives you the ruby programs process id
> $0 returns a string of the program that is running
> $* will give you arg list
>
> here = <<FILE
>  will work as
>  well which also
>  include #{interpolation}
> FILE
>
> Others can be found in a file called English.rb
>
> ~
>