|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
output to file - ksh
How do I send the output of the following command to a file?
uname -sr I tried "uname -sr > filename" but it doesn't work. It still displays the result of "uname -sr" on the screen and the file is blank. Thanks. |
|
#2
|
|||
|
|||
|
typo ?
if you enter uname -sr >xxx the output goes to 'xxx' but typing uname -qwerty >xxx the output goes to stderr and xxx is empty does your uname supports the options [sr] ? |
|
#3
|
|||
|
|||
|
Yes, my uname supports -sr and all of the other options that come with. I just don't get why the result goes to standard output instead of the file. All of the other file redirections work fine.
|
|
#4
|
|||
|
|||
|
What version of unix are you using? Does "uname -sr > file 2>&1" work any better? What does "whence uname" say?
|
|
#5
|
|||
|
|||
|
Thanks Perderabo.
uname -sr > file 2>&1 worked. Thanks again. |
|
#6
|
|||
|
|||
|
You're welcome, but I must say that you are using an odd system. That "2>&1" is usually not needed with uname. I would still like to know what version of unix you're using.
|
|
#7
|
|||
|
|||
|
on the commad line:
uname -what-you-want >filename MUST work if not, you have a probl with the sys (call the sys-adm) when you do that in a script: you accidentally (or not) closed the stdout-fd |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > output to file - ksh |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|