mirror of https://github.com/dirtbags/moth.git
19 lines
262 B
Bash
19 lines
262 B
Bash
|
#! /bin/sh
|
||
|
|
||
|
## Run like this:
|
||
|
##
|
||
|
## socat EXEC:./solution.sh EXEC:./revwords 3<token.txt
|
||
|
##
|
||
|
|
||
|
lrev () {
|
||
|
while [ -n "$1" ]; do
|
||
|
echo $1 | rev
|
||
|
shift
|
||
|
done
|
||
|
}
|
||
|
|
||
|
while read line; do
|
||
|
echo $line 1>&2
|
||
|
enil=$(lrev $line)
|
||
|
echo $enil
|
||
|
done
|