How to use for/while/until loop in bash
|
|
|
Comments (4)
Bash and the native Unix/Linux tools (sed, awk, etc.) make it easy to process text and files. I turn to Ruby when something needs to be cross-platform, but many things involving editing text and writing and processing files is easier in Bash.
It's definitely worth learning how to manipulate text and files in a scripting language like Ruby, Python or Perl, but often a Bash script is faster to create.
I fell in love with Ruby several years ago and for a while used it almost exclusively as my scripting language of choice. Now I've migrated to Python mainly because of the vast library support encircling that language.
I've used Perl and Python on occasion, but never Ruby. As Steven notes, there are many simple editing tasks that can be handled in Bash without utilizing other languages. For some simple tasks, you don't need any other tools; other times it is worth calling another tool from Bash; still, unless it is a complex task, doing it in Bash is simpler and often easier.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Sign up and post (it is free) or Log in and post
