[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] A do nothing function
From: |
DJ Mills |
Subject: |
Re: [Help-bash] A do nothing function |
Date: |
Thu, 27 Sep 2012 12:38:41 -0400 |
On Thu, Sep 27, 2012 at 12:24 PM, Peng Yu <address@hidden> wrote:
> Hi,
>
> I have to use cat if just want to pass the stdin to stdout. But this
> requires calling cat. Is there a more efficient way to just past stdin
> to stdout?
>
> /tmp$ cat test.sh
> #!/usr/bin/env bash
>
> function cmd {
> cat
> }
>
> echo xxxx | cmd | cat
>
> --
> Regards,
> Peng
>
No, cat's the easiest/best way to accomplish that.
However, that raises the question of why you wouldn't ust omit the whole thing
- [Help-bash] A do nothing function, Peng Yu, 2012/09/27
- Re: [Help-bash] A do nothing function,
DJ Mills <=
- Re: [Help-bash] A do nothing function, Bob Proulx, 2012/09/27
- Re: [Help-bash] A do nothing function, Greg Wooledge, 2012/09/28
- Re: [Help-bash] A do nothing function, DJ Mills, 2012/09/28
- Re: [Help-bash] A do nothing function, Bob Proulx, 2012/09/28
- Re: [Help-bash] A do nothing function, Greg Wooledge, 2012/09/28
- Re: [Help-bash] A do nothing function, Bob Proulx, 2012/09/28