Skip to content
Novus Examples
sh79 B

Shell — Hello World

The classic hello-world in Bash — a shebang and echo, with LF line endings so it runs on Unix — for testing highlighters, ShellCheck, and shell parsers.

Preview — first 4 linessh
#!/usr/bin/env bash
# The classic first program, in Bash.
echo "Hello, world!"

Specifications

Language
Shell
Kind
hello-world
Lines
3
Encoding
UTF-8
Line Endings
LF

What is a .sh file?

A shell script (.sh) is a plain-text program for a Unix shell such as bash — a sequence of commands with variables, conditionals, loops, functions, and pipelines. Scripts start with a shebang line (like #!/usr/bin/env bash) and are used for automation, builds, and system administration.

How to use this file

Use an example .sh file to test syntax highlighters, shell linters (ShellCheck), formatters (shfmt), and parser or language-detection tooling. It uses LF line endings so it runs correctly on Unix.

Generated by generation/code_samples.py. Free for any use, no attribution required — license.