text/reverse
- 272 bytes
- View raw
1#!/usr/bin/env bash
2# Reverses the lines of the input. e.g.
3#
4# $ printf " apple \n banana \n coconut \n" | reverse
5# coconut
6# banana
7# apple
8#
9# See https://stackoverflow.com/q/742466/1558022
11set -o errexit
12set -o nounset
14perl -e 'print reverse <>'