I can use every language to realize it, but I want to use shell.
- Use shell command or shell script.
- For example, I have one word:
sport
. - I want to get another word:
oprst
.
Now I want to use shell to bring about it, how to do? Thanks!
Use the following Shell Script:-
#!/bin/sh
sortedWord=`echo $1 | grep -o . | sort |tr -d "\n"`;
echo $sortedWord;