#!/usr/bin/perl open $shell, q(/bin/bash -c 'while read -e LINE; do history -s $LINE; echo $LINE; done' |) or die $!; while (<$shell>) { print; }