help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] which file in bash source code (tarball) contain a print


From: Greg Wooledge
Subject: Re: [Help-bash] which file in bash source code (tarball) contain a print output function
Date: Tue, 20 Mar 2012 16:04:08 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Mar 21, 2012 at 02:21:41AM +0700, Opponent O. Oliviala wrote:
> I have bash-4.2.tar.gz What inside this, All source code .c/.h ,
> configuration file. I want to find where is the print standard output
> function and add my script like sed 's,Hello,Hi,gI'before it printed. The
> result will be every standard output with the hello word will change to Hi
> word.

Bash doesn't generally produce much output by itself.  Rather, it's used
to execute commands, and some of those commands may produce output.

If you want to filter the output of a script as described above, the best
way would be to pipe the script through sed:

  ./myscript | sed 's,Hello,Hi,g'

If that doesn't satisfy your requirement, then you need to explain a bit
more about what you require.  (Modifying bash at the source code level to
filter the output of a script is a completely unsuitable approach.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]