DEV Community

Discussion on: 15 Command Line Tools which Spark Joy in Your Terminal

Collapse
 
vonheikemen profile image
Heiker

Speaking of creating your own cli tools. I would like to share something cool: a scripting language called ABS.

This is why I think is cool.

  • It has a C-like syntax.
  • You can call external commands and handle the result in a convenient way.
  • It has a module system.
  • It has a builtin tool that allows you to create cli tools.

Here is a little snippet.

tz = `cat /etc/timezone`

if !tz.ok {
  echo("Ooops, something went wrong")
  exit(1)
}

continent, city = tz.split("/")

echo("Best city in the world?")

selection = stdin()

if selection == city {
  echo("You might be biased...")
} else {
  echo("Yes, ${selection} is awesome.")
}
Enter fullscreen mode Exit fullscreen mode

I wrote about this language a few years ago, here is the post if anyone is interested.

I like this a lot because it allows people who are familiar with a languages like javascript or PHP (that would be me) to write shell scripts in a way that feels comfortable.