I am completely convinced that i discovered the most useless command:
revThe manpage says:
rev - reverse lines characterwiseIs there anything, where i can use this command?
Ok. I can check if a word is a palindrome (like 123321 or otto):
#!/bin/bashThis script i found in here.
# Shell script to test if a string is a palindrome
# This simply uses the 'rev' command found in util-linux-ng package
# and checks if the reverse of the string is same as the original
echo "Enter a String : "
if [ "$(echo $string | rev)" = "$string" ]
echo "\"$string\" IS a Palindrome"
echo "\"$string\" IS NOT a Palindrome"
Has anyone used the rev command for something reasonable?
Please write a comment!
More useless commands can be found here.