NASutils Knowledge BaseUnofficialPolski

Bash · lesson 1 of 30 · First steps · bonusRun a script

The first line names the shell. chmod +x lets you start the file with ./

Programming on the NAS › Bash in 30 lessons

01-hello.sh Download 01-hello.sh

#!/usr/app/TurboShell/bin/bash
echo "Hello from the NAS"

Terminal

$ bash 01-hello.sh
Hello from the NAS
$ chmod +x 01-hello.sh && ./01-hello.sh
Hello from the NAS

Exercise

Print the date on a second line.