implement interactive command using pipes