Re: [PATCH] Use perl instead of tac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx> wrote:
> 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)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux