"ls -R|sort|uniq" should work

3 Users have rated as useful.
Login to rate this answer.
Shell script accepts parameters in following format
$1 would be the first command line argument, $2 the second, and so on
$0 is the name of the script or function
If your script has more than 9 params then accept in following way
${12} : 12th param
${18} : 18th param
Login to rate this answer.
echo $string | cut -d” ” -f1
echo $string | cut -d” ” -f2
echo $string | cut -d” ” -f3
Login to rate this answer.
set -x
input_string=$1
if [ -z "$input_string" ] ; then
echo "Please enter a Text along with the script namen"
exit
fi
reversed_string=$(rev $input-string)
if [ "$input_string" -eq "$reverse_string" ] ; then
echo "The String $input_String is a Palindrome"
else
echo "This string is not a palindrome"
fi
Login to rate this answer.
ls -R | grep -v "/" | sort | uniq
grep -v "/" -- is used to filter out directories
Login to rate this answer.
ls -pR | grep -v "/" | grep -v ":" | sort |uniq
Login to rate this answer.