12.Write a shell to reverse a string

 #!/bin/bash

read -p "Enter a string: " input

# Reverse the string

reversed=$(echo "$input" | rev)

echo "Reversed string: $reversed"


Comments

Popular posts from this blog

10.Write a shell script to count the number words,lines,character from given file accept file name from commandline.

2.Write a shell script to compile all C files and delete those files having errors.