Re: [PATCH] Use perl instead of tac
- From
- Jörg Sommer <joerg@alea.gnuu.de>
- Date
- Apr 28, 2008, 11:46 UTC
- Message-ID
- <slrng1be8l.25r.joerg@alea.gnuu.de>
- In-Reply-To
- <739FA851-F7F5-4CF9-B384-25AA7022B0C2@silverinsanity.com>
Hi,
Brian Gernhardt <benji@silverinsanity.com> wrote:
Show 11 quoted lines
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index 1751b08..303b754 100755
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -469,7 +469,7 @@ create_extended_todo_list () {
> test -n "${last_parent:-}" -a "${last_parent:-}" != $SHORTUPSTREAM
> && \
> echo reset $last_parent
> ) | \
> - tac | \
> + perl -e 'print reverse <>' | \What about using a shell function and a *big* variable or an intermediate file?
tac()
{
while read line
do
reversed="$line
$reversed"
done
echo "${reversed%
}"
}Bye, Jörg.
-- Ich halte ihn zwar für einen Schurken und das was er sagt für falsch – aber ich bin bereit mein Leben dafür einzusetzen, daß er seine Meinung sagen kann. (Voletair)