DataMind Oda's browser preview includes a shell for running commands against the preview's own filesystem, not the files on your computer. It is not bash: it runs a fixed command table with a fixed command-line grammar, and it refuses the rest by name. How the preview starts and what it mounts is on Browser preview; what it does not support at all is on Preview limitations; what its messages mean is on Preview diagnostics.
cd moves it for the rest of the current line, and cd - returns to the folder you were in before.Everything you can run is built into the shell. A name outside the table is not found instead of looked up.
cd, pwd, export, unset, env, printenv, exit, test, [, sleep, date, seq, true, false, :.ls, mkdir, cp, mv, rm, rmdir, touch, find, stat, basename.echo, printf, cat, head, tail, wc, grep, sort, uniq, cut, tr, sed, tee.which answers for any name: a known one reads <name>: shell built-in command, and an unknown one gets which: no <name> in the worker host command table with exit code 1.ln and readlink refuse. The preview filesystem has no symbolic links, so both answer <name>: not available in the worker host and exit 127.find understands -name, -type d and -maxdepth and refuses other predicates with find: unsupported predicate <word>; grep supports -e, -F, -i, -r and -R, -v, -l, -c, -n and -H; sed runs substitution scripts only. An option that is not understood is reported, not guessed at.test and [ cover the file checks -e, -f, -d, -s, -r, -w, -z, -n and !, and the comparisons =, ==, !=, -eq, -ne, -lt, -le, -gt and -ge; anything else is refused.; runs commands in order; && and || read the previous status; a pipeline reports the status of its last stage, and |& merges standard error into the pipe.cd or a variable set inside it is gone when it ends; a group shares the state, so its changes stay.< reads a file, <<< feeds a line of text and adds a newline, > truncates and writes, and >> appends. A > truncates its file when the redirect is set up, so even a command that writes nothing leaves an empty file.2>&1; any other form is refused, for example bash: 3>&1: unsupported descriptor redirection.bash: <path>: No such file or directory; a redirect the shell cannot resolve prints bash: ambiguous redirect.command substitution nested deeper than 16 levels.& does not start a background job. No scheduler exists here, so a command ended with & runs to completion in place, before the next command begins.exit stops the line and reports the status you gave it.$NAME reads a shell variable or an environment entry; ${NAME:-fallback} and ${NAME:+replacement} handle a missing or set value; $? is the previous status. A variable set in front of a command applies to that command alone.$(( . . . )) works on numbers and variables with +, -, * and /, and division truncates.*, ? and [. . . ] match against the preview filesystem, and ** covers a folder and everything under it. Matches are deduplicated and sorted, keep the spelling of the pattern, and a pattern with no match passes through unchanged.$0 reads bash and $$ reads 1; $@ and $* are always empty.A failure is reported the way a shell utility reports it, not as a raw system error. The shell's own messages carry the bash: prefix, the name the interpreter reports for itself.
<program>: <path>: <reason>, for example cat: missing. txt: No such file or directory. The common reasons are No such file or directory, Not a directory, Is a directory, Directory not empty and File exists; a denied access reads permission denied.bash: <name>: command not found, exit code 127.bash: syntax error: <first line of the parse error>, exit code 2.bash: <name>: <program error>, exit code 1.bash: process worker failed: <message> and exit code 1.ls: <operand>: No such file or directory; rm adds Is a directory for a folder it will not remove; rmdir refuses a folder that still holds entries with Directory not empty; cp and mv ask for a source and a destination when one is missing; stat: <operand>: No such file or directory; basename: expected a path.cd: <target>: No such file or directory or cd: <target>: Not a directory; sleep: invalid time interval '<value>'; seq: expected numeric bounds; test: unsupported expression; grep: no pattern given and grep: <target>: Is a directory; cut: expected -f or -c; tr: expected a source set and tr: expected a replacement set; sed: only substitution scripts (s/ pattern/ replacement/ ) run in the worker host.| Exit code | Meaning |
|---|---|
0 | The command finished successfully. |
1 | A command reported a failure, or a broken program was contained. |
2 | The line could not be parsed, or a built-in or utility was used wrongly. |
125 | The sandbox launcher failed before the command ran. |
127 | The name is not in the command table. |
130 | The line was aborted, or the command was stopped. |
sleep reports 130 as soon as it is signalled. When that is not enough, the command's worker is terminated, which ends even a running loop. A command that cannot be preempted this way is only asked to stop.killed by signal.workspace-write allows writes inside the workspace and its temporary folder, and denies a write outside them.read-only refuses writes and keeps the command confined.danger-full-access runs the command without the sandbox.permission denied.landlock-run: on standard error, for example landlock-run: cannot open rule path: <path>: No such file or directory or landlock-run: exec failed: No such file or directory. A command that exits 125 on its own is not a launcher failure, so check for that prefix. Probed, the launcher answers landlock: fully enforced and exits 0.The table is fixed: shell built-ins cd, pwd, export, unset, env, printenv, exit, test, [, sleep, date, seq, true, false and :; file tools ls, mkdir, cp, mv, rm, rmdir, touch, find, stat and basename; text tools echo, printf, cat, head, tail, wc, grep, sort, uniq, cut, tr, sed and tee; and which. A name outside the table reports command not found.
command not found?The shell runs nothing from the machine: every command is built in, so a name the preview does not implement is not found. which <name> tells you whether a name exists here.
case in the preview shell?No. The interpreter understands chaining (;, &&, ||), pipelines (|, |&), subshells, groups, redirections and command substitution, and that is the whole grammar. Loops, functions, case and job control are not part of it.
& run in the background?No. There is no scheduler here, so the command runs to completion in place, before anything after it on the line.
> even though the command wrote nothing to it?The redirect truncates its file when it is set up, not when the command writes to it. A command that writes nothing still leaves an empty file there; >> appends instead.
cd inside a subshell not change my working folder?A subshell runs on a copy of the shell's state, so a cd or a variable set inside it is gone when it ends. A group shares the state, so its changes stay.
sed script in the preview shell?No. sed runs substitution scripts only, written as s/ with the g and i modifiers; anything else is refused with sed: only substitution scripts (s/.
0 success, 1 a failure or a contained program defect, 2 a parse or usage error, 125 a sandbox launcher failure before the command ran, 127 a name outside the command table, and 130 a line that was aborted or a command that was stopped.
It was aborted or stopped, either by you or because its line was cancelled. The final result of an aborted run carries no output of its own; anything already forwarded while it ran stays readable.
permission denied mean here?The sandbox denied the access: the command tried to read or write outside its grants. The mode a command runs under decides what is allowed, and workspace-write denies writes outside the workspace and its temporary folder.
which call commands shell built-ins?Because every command is built into the shell. There are no program files to point at, so which reports a known name as <name>: shell built-in command instead of a path.
bash:?That is the name the interpreter answers to ($0 reads bash), and its diagnostics keep the shape of a shell utility's output. The shell itself is not bash: the command table and grammar on this page are its own.