Shell++ - An Object Oriented Shell Script

Shell++ has a mixture of BASH and C++


Shell++ - An Object Oriented Shell Script

Shell++ is a programming language that aims to bring functionalities from modern languages, such as ease of manipulation of data structures, object-oriented programming, functional programming and others including Shell Script.

Installation

Clone the repository recursively:

git clone --recurse-submodules -j8 https://github.com/alexst07/shell-plus-plus

After cloned, we realized that it uses CMake, if you export the CXX variable, you may be able to use another compiler, but you will need: CMake, GCC and GNU Make.

Some distros offer the package with essential tools for building binaries, if you use Debian, Ubuntu, Mint and simlares, just install the package: build-essentials. If you use Gentoo, you don’t need to install anything.

# you can change the compiler with this command:
export CXX=$(which clang++)

mkdir build && cd build
cmake ..
make

After building the binary, it can be found at: ./shell/shpp. You can run one:

sudo make install

Remembering that you can also execute the binary directly.

Basic usage example:

Hello, World!

cat << EOF > hello.sh
print("Hello, Shell++")
EOF
shpp hello.sh

And among several other forms of use that we can see here in the project’s repository documentation.

Alternatives to Shell++:

Among other options:

Watch the video

The video is in Brazilian Portuguese, but you can use automatic translation from Youtube or even just watch the procedures, because the commands are universal


cpp shellscript bash


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles