Don't overlook Bash for text processing and file handling
|
Author | Content |
---|---|
Steven_Rosenber Feb 14, 2021 5:18 PM EDT |
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. |
Steven_Rosenber Feb 14, 2021 5:43 PM EDT |
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. |
penguinist Feb 14, 2021 8:48 PM EDT |
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. |
masinick Feb 17, 2021 11:20 AM EDT |
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. |
Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]
Becoming a member of LXer is easy and free. Join Us!