commands

A crystal shard for simple, skiddie friendly UNIX command execution

commands

commands is a Skiddie-friendly Crystal Shard to make it easier to execute commands.

Installation

  1. Add the dependency to your shard.yml:

dependencies: 

         commands:

              github: Pr0ngleDev/commands

  1. Run shards install

Usage

require "commands"

execCommand can be used to execute a bash command and receive its output

Crystal.execCommand("Hello World") # Returns Hello World


execProscess can be used to execute a bash command and recieve its error code

Crystal.execProcess("echo Hello World") # Returns 0


Examples


 foo = Crystal.executeCommand("echo foo")
 puts foo 

This would print foo to the stdout


	foo = Crystal.executeCommand("echo haha")
	puts foo.reverse

This would print ahah to the stdout

Contributors

Repository

commands

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • about 1 month ago
  • March 5, 2025
License

MIT License

Links
Synced at

Sat, 19 Apr 2025 16:10:10 GMT

Languages