You probably know it, but in case not, and for others who might not know: Ruby was influenced by Perl, and Perl was influenced by awk. (Both Ruby and Perl were influenced by other languages too.) And (relevant to this thread) Perl was influenced by C, sed, and Unix shell too.
https://en.wikipedia.org/wiki/Ruby_(programming_language)
https://en.wikipedia.org/wiki/Perl
See "Influenced by" sections at both above pages.