Install sttr String Transformation Tool on Ubuntu 24.04

Install sttr String Transformation Tool on Ubuntu 24.04

The sttr is a command line tool for performing various transformation operations on the string. It supports operations like case conversion, encoding (Base64, URL), hashing (SHA256, MD5), and more. This tutorial explains how to install sttr string transformation tool on Ubuntu 24.04.

Install sttr

Get the latest version of sttr from its GitHub repository and save it to a variable:

STTR_VERSION=$(curl -s "https://api.github.com/repos/abhimanyu003/sttr/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Run the following command to download sttr:

wget -qO sttr.tar.gz https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_${STTR_VERSION}_linux_amd64.tar.gz

Extract executable to /usr/local/bin:

sudo tar xf sttr.tar.gz -C /usr/local/bin sttr

We can check the sttr version using the following command:

sttr version

Remove unneeded file:

rm -rf sttr.tar.gz

Testing sttr

The sttr command supports various string operations, such as the lower operation, which converts text to lowercase:

sttr lower 'Hello World'

Output:

hello world

Uninstall sttr

To uninstall sttr, remove the related file:

sudo rm -rf /usr/local/bin/sttr

Leave a Comment

Cancel reply

Your email address will not be published.