Sunday, February 27, 2022

[SOLVED] Creating classes and objects using bash scripting

Issue

I'm trying to use bash scripting to make an script act like a phone book, so i tried to create classes and objects but unfortunately i couldn't find a way to do that ! so i'm asking how to create a class using bash scripting??


Solution

Bash is a scripting language, that doesn't support OOP, so you can't. Try Python.

The only other thing you could do is have several arrays, but that's messy. Use the index to link them.



Answered By - SaintHax
Answer Checked By - Robin (WPSolving Admin)