Re: can I color STDERR seperately in red
2008-07-29, 16:12(+00), Rahul:
Normally the stderr and stdout are both tied to the terminal of my tcshell.
Is it possible to tweak the shell so that all STDERR output is colored
distinctively, say in red?
You could do something like:
expect -c '
log_user 0
spawn -noecho -pty
set a $spawn_id
spawn -noecho sh -c "ls /etc/passwd /unlikely 2>&$spawn_out(slave,fd)"
set b $spawn_id
expect {
-i $a -re {.+} {
send_user "\033\[31m$expect_out(buffer)\033\[m"
exp_continue
}
-i $b -re {.+} {
send_user $expect_out(buffer)
exp_continue
}
}'
--
Stéphane
.
Relevant Pages
- Kellys Recent IE Crashes/Browse in New Process
... Kelly has a recent tweak in her list: ... this open a new explorer shell to try to prevent a crash? ... several "not responding" in task manager's list by hitting the Windows Key ... +E and opening Windows Explorer and minimizing it to the desktop before I ... (microsoft.public.windowsxp.customize) - Re: can I color STDERR seperately in red
... Is it possible to tweak the shell so that all STDERR output is colored ... There are so many script frontends to colorize output ... $0,"simple wrapper around maketo colorize output","Bjarni R. ... (comp.os.linux.misc) - Re: can I color STDERR seperately in red
... Is it possible to tweak the shell so that all STDERR output is colored ... There are so many script frontends to colorize output ... $0,"simple wrapper around maketo colorize output","Bjarni R. ... (comp.unix.shell) - Re: Folder Views Are Forgotten
... It fixes most problems with saved folder views. ... Applying Kelly's tweak -- boosting the count to 8000 -- did not fix my problem even though I used the tweak and then immediately rebooted. ... I manually deleted the Bags and BagMRU keys. ... It appears the keys at Shell have been regenerated, but I can't tell if any necessary settings there are missing. ... (microsoft.public.windowsxp.general) - Re: chkdsk runs
... MVP Windows - Shell / User ... Verne Smith wrote: ... another tweak at ... (microsoft.public.windowsxp.help_and_support) |
|