Giter VIP home page Giter VIP logo

esh's Introduction

esh

esh(1) is an enhanced version of envsubst(1) that evaluates more than just environment variables, but also whole bash-like expressions. For example,

Hello ${RECIPIENT},

Your machine $(hostname) is seeing an abnormally high amount of usage.

Processes using the most memory:
$(ps aux --sort=-%mem | awk 'NR<=6{FS=" "; OFS="\t"; print $1, $4, $11}')

Processes using the most cycles:
$(ps aux --sort=-%cpu | awk 'NR<=6{FS=" "; OFS="\t"; print $1, $3, $11}')

Regards,
System Administrator

will become something like the following:

Hello Josh,

Your machine localhost is seeing an abnormally high amount of usage.

Processes using the most memory:
USER	%MEM	COMMAND
user	11.1	/opt/google/chrome/chrome
user	10.1	/opt/google/chrome/chrome
user	8.9	/opt/google/chrome/chrome
user	8.5	/opt/google/chrome/chrome
user	7.1	/opt/google/chrome/chrome

Processes using the most cycles:
USER	%CPU	COMMAND
user	7.2	/opt/google/chrome/chrome
user	5.7	/opt/google/chrome/nacl_helper
user	2.4	/opt/google/chrome/chrome
user	1.1	/opt/google/chrome/chrome
user	1.1	/opt/google/chrome/chrome

Regards,
System Administrator

As you may have guessed, this was inspired by ruby's erb(1).

Building

  • make - build executable
  • make debug - build debug executable (prints debug information from yacc)
  • make [f]clean - cleans up object files and files generated by yacc & lex

See Makefile for more about each target.

License

MIT

esh's People

Contributors

patgrasso avatar

Stargazers

 avatar

Watchers

 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.