#!/bin/bash FILE=`ls -1 *.txt | sort | tail -1` #FILE="ls -1 *.txt | sort | tail -1" echo "Your last text file is: $FILE" echo $FILE echo "$FILE"