DEV Community

Discussion on: Introduction to BASH Scripting: Part-2

Collapse
 
epsi profile image
E.R. Nurwijayadi

Good article. Thank you for posting.

BASH can also be used to parse simple data structure.

To help more beginner, I have made a working example of BASH with source code in github.

🕷 epsi.bitbucket.io/lambda/2021/02/0...

First the data sructure in CSV like fashioned.

BASH: Data Structure

We can flatten using loop, and later pipe using uniq to find unique value.

BASH: Flatten

However, bash purist can manage their own unique function.

BASH: Unique Module

And solved unique to any array.

BASH: Using Unique Module

I hope this could help other who seeks for other case example.

🙏🏽

Thank you for posting with general introduction..

Collapse
 
mr_destructive profile image
Meet Rajesh Gor

Thanks a lot for adding on it. Looks really interesting and helpful :)