Giter Site home page Giter Site logo

yancheng199287 / cicada Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mitnk/cicada

0.0 1.0 0.0 731 KB

A bash-like Unix shell written in Rust

Home Page: https://hugo.wang/cicada/

License: MIT License

Rust 94.94% Makefile 0.17% Shell 4.90%

cicada's Introduction

Cicada Unix Shell

Travis Build Status Latest Version

Cicada is a simple Unix shell written in Rust.

Documents

Try out cicada with Docker

$ docker pull mitnk/cicada
$ docker run --rm -it mitnk/cicada
(in-cicada) $ cinfo

Features

Run programs and pipelines

$ ls | head -n3
Desktop
Documents
Downloads

$ echo foo,bar | awk -F "," '{print $2, $1}'
bar foo

With redirections

$ ls file-not-exist 2>&1 | wc > e.txt
$ cat e.txt
       1       7      46

Command substitution

$ ls -l `which sh`
-r-xr-xr-x  1 root  wheel  618512 Oct 26  2017 /bin/sh

$ echo "Time is $(date)."
Time is Sun Sep  2 12:04:13 CST 2018.

Run multiple commands (with logical)

$ echo foo; echo bar
foo
bar

$ echo foo && echo bar
foo
bar

$ echo foo || echo bar
foo

Math arithmetic directly in the shell!

$ 1 + 2 * 3 - 4
3
$ (1 + 2) * (3 - 4) / 8.0
-0.375
$ 2 ^ 31
2147483648

Cicada is also a library (BETA)

Read APIs here: https://docs.rs/cicada/.

FAQs

cicada's People

Contributors

seeekr avatar thedrow avatar sanxiyn avatar king6cong avatar rusthater avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.