Skip to content

Instantly share code, notes, and snippets.

View bene20's full-sized avatar
💭
Always learning!

Ebenézer Rangel Botelho bene20

💭
Always learning!
View GitHub Profile
@ffissore
ffissore / jshell-wrapper
Last active September 19, 2023 10:21
with jshell-wrapper you get runnable java scripts: it removes the heading shebang, adds an "/exit" for good measure, and passes the result to jshell
TMP=`mktemp`
tail -n +2 $@ >> $TMP
echo "/exit" >> $TMP
$JAVA_HOME/bin/jshell -q --execution local $TMP
rm $TMP
#put this file in /usr/local/bin/ or somewhere in your $PATH