Re: [linux-audio-user] A dumb Unix question about console output

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] A dumb Unix question about console output
From: Larry Troxler (lt_AT_westnet.com)
Date: Sun Jul 13 2003 - 05:36:53 EEST


On Saturday 12 July 2003 22:13, toby_AT_tobiah.org wrote:
< I mean, how would you like it if
> you typed 'ls', only to get back:
>
> ls: slow.wav

...

Ahh, I see your point now.

>
> Create an executable shell script in your path that looks like this:
>
>
> #***** SCRIPT *****
> function showme(){
> while read foo
> do echo $1: $foo
> done
> }
>
> $@ | showme $1
> #***** /SCRIPT *****
>
> I called mine, "identify".
>
> Now, let's test it with grep:
>
> sinewave:toby:toby> identify grep foo *
> grep: Binary file DSC00326.TIF matches
> grep: Binary file QtC-0.0.2.lsm matches
> grep: adf: afsdadsfadfasdfasdfasdfasdfasdfasdf toby adfadfadf foo
> grep: adf: print('myfoot', 'myfoot');
> grep: adf: print('yourfoot', 'yourfoot');
> grep: doit: while read foo
> grep: doit: do echo $1: $foo
>
> So, now stdout and stderr get prefixed with the name
> of the program. Easy, yes?
>
>
> Tobiah

Well, ok, maybe easy, but still ...

I guess the answer to my original question is that, yes, people fire up a
seperate xterm for each audio app they launch :-)

I mean, I have a hard time believing that what you're describing is common
practice.

Thanks for your time! (really, thanks!)

Regards

Larry Troxler


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Jul 13 2003 - 05:41:22 EEST