#!/bin/bash path="/var/log/users" if [ "$1" = "root" ] || [ "$1" = "" ]; then file=$(cat $HOME/.log/last.txt) else file=$(cat /home/$1/.log/last.txt) fi tail -f $file exit 0