#!/bin/bash # ls (anything in) your homedir (eq. ls $HOME/$1) if [[ $1 == *..* ]]; then echo "No .." >&2 exit 1 fi ls "$HOME/$1"