DaemonForums  

Go Back   DaemonForums > Miscellaneous > Off-Topic

Off-Topic Everything else.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th December 2011
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,051
Thanked 118 Times in 93 Posts
Cool making STDERR more visible

Interesting 'mod' for making STDERR more visible: https://github.com/sickill/stderred

__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #2   (View Single Post)  
Old 15th December 2011
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 534
Thanked 14 Times in 13 Posts
Default

If you redirect stderr to a file, won't you get the escape codes in there? (Where they would likely be unwanted.)
Reply With Quote
  #3   (View Single Post)  
Old 16th December 2011
yggdrasil yggdrasil is offline
New User
 
Join Date: Oct 2010
Posts: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by IdOp View Post
If you redirect stderr to a file, won't you get the escape codes in there? (Where they would likely be unwanted.)
Just tested, apparently it doesn't.
Reply With Quote
  #4   (View Single Post)  
Old 16th December 2011
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 534
Thanked 14 Times in 13 Posts
Default

Quote:
Originally Posted by yggdrasil View Post
Just tested, apparently it doesn't.
Thank you.
Reply With Quote
  #5   (View Single Post)  
Old 16th December 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,051
Thanked 198 Times in 156 Posts
Default

Good idea. And if you look at the source, also surprisingly simple.

Why isn't this feature in shells?
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #6   (View Single Post)  
Old 18th December 2011
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,051
Thanked 118 Times in 93 Posts
Default

@Carpetsmoker

It is possible via SHELL, at least via ZSH, havent checked the others:
http://en.gentoo-wiki.com/wiki/Zsh#Colorize_STDERR



EDIT:

This one seems to work better:

exec 2>>( while read X; do print "\e[91m${X}\e[0m" > /dev/tty; done & )
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd

Last edited by vermaden; 18th December 2011 at 10:02 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making your own Distro SL6-A2000 FreeBSD General 4 22nd August 2011 01:50 PM
Z-410: How ZFS is slowly making its way to Mac OS X J65nko News 0 18th March 2011 08:10 PM
Shell script: echo something to stderr Carpetsmoker Programming 4 28th June 2010 09:04 PM
FreeBSD making the move from CVS to Subversion drhowarddrfine FreeBSD Installation and Upgrading 9 8th June 2008 05:29 PM
[Help] Making the desktop in [BSD 7.0] seadog109 FreeBSD General 15 9th May 2008 05:10 AM


All times are GMT. The time now is 09:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick