#! /bin/sh echo -n "Enter Filename-> " read filename if [ -f "$filename" ]; then sort $filename | uniq | tee sorted.txt else echo "No $filename in $pwd...try again" fi exit 0
then save it with any name you want e.g: s.sh
then run it like this
./s.sh