Running Bash in Zerethon IDE
What Run does with your script, the time limit, input, tests, and what a run cannot do.
Runs in Zerethon IDE · Bash 5.2
Official Bash documentation ↗
- Run (Ctrl/⌘+Enter) runs the entry file —
main.shby default — withbash --noprofile --norc(Bash 5.2): no startup files, only your script. Make another file the entry with the ▶ button next to it in the explorer. - Output and errors appear in the Output tab; what you type in the Input tab is the script's standard input.
- A run is stopped after 10 seconds. Memory and the number of processes are limited, there is no network (
curl,wgetand package installs fail), and the project files are read-only (write to/tmp). - Scripts can use the image's BusyBox tools (
grep,sed,awk,sort…) and Perl, inside the same sandbox. - Run tests (Ctrl/⌘+Shift+Enter) runs every file named
test_*.shwith Bash, each on its own. A test file passes when it exits with status 0.
test_strings.sh
source ./lib/strings.sh
[[ $(shout "hi") == "HI!" ]] || { echo "shout failed"; exit 1; }
[[ $(repeat x 3) == "xxx" ]] || { echo "repeat failed"; exit 1; }
echo "strings ok"
lib/strings.sh from “Several files: source”.
Tip: The editor highlights Bash and completes keywords and common commands. There is no formatter or live checking (such as ShellCheck) yet: Run shows Bash's own messages.