[clug] shell stdout and stderr

Arafangion thestar at fussycoder.id.au
Thu Dec 1 03:09:22 GMT 2005


On Thu, 1 Dec 2005 02:52 pm, Tony and Robyn Lewis wrote:
> In a bourne shell, I want to make all stderr (and stdout) go to files,
> *from within that script* - i.e. the standard redirection won't cut it.

I don't understand what you mean - what don't you want about the following:

arafangion at therock:~$ cat test
#!/bin/bash
/test
arafangion at therock:~$ ./test 2> test.out
arafangion at therock:~$ cat test.out
./test: line 2: /test: No such file or directory
arafangion at therock:~$


More information about the linux mailing list