DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th August 2014
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default new to ksh ... redirections do not work well ?

Here is a problem with ksh :
I tried to redirect the error standard output on the standard output, and the standard output on a file called foo.
cat nothing 2>&1 > foo
it doesn't redirect the error output. the error appears on the console, and foo contains nothing.
I have a problem with X, and I can't say don't show graphical things, just write out the errors right_here.
Reply With Quote
  #2   (View Single Post)  
Old 28th August 2014
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: 1,027
Default

Quote:
Originally Posted by spermwhale_warrior View Post
2>&1 > foo
This will redirect stderr to where stdout goes at the point that 2>&1 is written. At that point it's still the terminal, not the file foo. stdout is only redirected to foo after this. So I think you want to reverse the two,

>foo 2>&1

(I don't use ksh on NetBSD, but this should be pretty generic behaviour.)
Reply With Quote
  #3   (View Single Post)  
Old 28th August 2014
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Exclamation

Thanks, but I notice that
X > /dev/null 2> ici
send errors to the file 'here', but doesn't redirect standard output to nothingness. It still occupies the current tty, which is problematic as it doesn't work and I don't know how to shut it put.

Last edited by spermwhale_warrior; 28th August 2014 at 06:53 PM. Reason: Sorry, I have written it in French ... because that's the language I think in.
Reply With Quote
  #4   (View Single Post)  
Old 28th August 2014
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: 1,027
Default

My understanding is that the forum rules require posts in English. Besides that, "je ne parles pas de Francais".
Reply With Quote
  #5   (View Single Post)  
Old 28th August 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

According to Chapter 9 of the NetBSD Guide, CTRL-ALT-Backspace (CTRL-ALT-Retour Arrière) can be used to signal X11 to quit.
Reply With Quote
  #6   (View Single Post)  
Old 28th August 2014
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

It was a mistake, I accidentaly forgot to translate.
Ok for the CTRL-ALT-BACKSPACE, but why the redirection doesn't work with X ? Do programs that open a new tty behave a bit differently with redirections? ?
Reply With Quote
  #7   (View Single Post)  
Old 28th August 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

X doesn't open a tty.

Perhaps what you are looking for are X errors, warnings, and information messages? If so, all of these should be captured in /var/log/Xorg.0.log for your review.
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
why won't my table work? tomp OpenBSD Security 3 25th August 2011 12:23 PM
My Mouse Don't Work ??? sharris FreeBSD General 9 7th May 2011 02:15 AM
nspluginwrapper not work... marduk NetBSD Installation and Upgrading 4 3rd January 2011 10:23 PM
ATI Catalyst.... Does it work? echoblack OpenBSD Installation and Upgrading 10 17th June 2009 09:04 AM
Getting Qt4 to work on FreeBSD enpey FreeBSD Ports and Packages 6 6th May 2008 07:20 AM


All times are GMT. The time now is 08:17 AM.


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