Unix Technical Forum

bdf > toto

This is a discussion on bdf > toto within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi, It is a newbie general question. I want to redirect the result of bdf in a file. I ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 06:41 AM
YAB
 
Posts: n/a
Default bdf > toto

Hi,
It is a newbie general question. I want to redirect the result of bdf in a
file.

I tried this.
[%] echo $SHELL
ksh
[%] bdf > toto ; bdf | tee toto ; bdf 2>toto

My Pb is that size of toto is always 0
Why ? How to redirect bdf output into toto file ?
Thanks


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 06:41 AM
all mail refused
 
Posts: n/a
Default Re: bdf > toto

On 2006-11-07, YAB <yhab.abiad@orange.fr> wrote:

> [%] bdf > toto ; bdf | tee toto ; bdf 2>toto
>
> My Pb is that size of toto is always 0
> Why ? How to redirect bdf output into toto file ?


Did you see 100% anywhere in the bdf output?

--
Elvis Notargiacomo master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-17-2008, 06:41 AM
Jim Marsden
 
Posts: n/a
Default Re: bdf > toto

Your last command is redirecting bdf's standard error output to toto.
Assuming bdf is running properly there will be no errors output to toto,
hence a zero length file:

% bdf > toto ; bdf | tee toto ; bdf 2> toto
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 311296 142968 167048 46% /
....etc
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 311296 142968 167048 46% /
....etc

% ll toto
-rw-rw-r-- 1 marsdenj usr 0 Nov 8 17:31 toto


Check each of your commands separately:

% bdf > toto
% ll toto
-rw-rw-r-- 1 marsdenj usr 2261 Nov 8 17:31 toto


% bdf | tee toto
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 311296 142968 167048 46% /
....etc
% ll toto
-rw-rw-r-- 1 marsdenj usr 2261 Nov 8 17:32 toto


% bdf 2> toto
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 311296 142968 167048 46% /
....etc

% ll toto
-rw-rw-r-- 1 marsdenj usr 0 Nov 8 17:32 toto



YAB wrote:
> Hi,
> It is a newbie general question. I want to redirect the result of bdf in a
> file.
>
> I tried this.
> [%] echo $SHELL
> ksh
> [%] bdf > toto ; bdf | tee toto ; bdf 2>toto
>
> My Pb is that size of toto is always 0
> Why ? How to redirect bdf output into toto file ?
> Thanks
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-17-2008, 06:41 AM
Ted Linnell
 
Posts: n/a
Default Re: bdf > toto

"YAB" <yhab.abiad@orange.fr> wrote:

>Hi,
>It is a newbie general question. I want to redirect the result of bdf in a
>file.
>
>I tried this.
>[%] echo $SHELL
> ksh
>[%] bdf > toto ; bdf | tee toto ; bdf 2>toto
>
>My Pb is that size of toto is always 0
>Why ? How to redirect bdf output into toto file ?
>Thanks
>

Is your command line really "bdf > toto ; bdf | tee toto ; bdf
2>toto"?

If so you are running 3 commands 1one after the other, each writing a
new version of toto.

bdf > toto writes the bdf output to toto

bdf|tee toto writes the bdf output to the screen and toto, replaceing
the previous bdf output

bdf 2>toto writes any error messages (usually none) from the bdf
command into toto, replaceing any previous contents

Try the commands 1 at a time.

Regards,

Ted.
================================================== ============
| Ted Linnell <edlinnell@acslink.net.au> |
| |
| Nunawading, Victoria , Australia |
================================================== ============
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-17-2008, 06:41 AM
YAB
 
Posts: n/a
Default Re: bdf > toto

Of course, I've executed commands seperatly and after each command I've run
ls -l
bdf => gives a correct standard output
bdf > toto => then ls -l toto prints 0
and so on for other commands (bdf | tee toto).

All your answers confirm that there is no syntax error with my command.
I'll try with >> and with tee -a
I'll check also if there is a quota limit with my account.

Many thanks for your answers.


"Ted Linnell" <edlinnell@acslink.net.au> a écrit dans le message de
news:uq43l2diuq5n727a6nh526hjh8r9jufd0i@4ax.com...
> "YAB" <yhab.abiad@orange.fr> wrote:
>
> >Hi,
> >It is a newbie general question. I want to redirect the result of bdf in

a
> >file.
> >
> >I tried this.
> >[%] echo $SHELL
> > ksh
> >[%] bdf > toto ; bdf | tee toto ; bdf 2>toto
> >
> >My Pb is that size of toto is always 0
> >Why ? How to redirect bdf output into toto file ?
> >Thanks
> >

> Is your command line really "bdf > toto ; bdf | tee toto ; bdf
> 2>toto"?
>
> If so you are running 3 commands 1one after the other, each writing a
> new version of toto.
>
> bdf > toto writes the bdf output to toto
>
> bdf|tee toto writes the bdf output to the screen and toto, replaceing
> the previous bdf output
>
> bdf 2>toto writes any error messages (usually none) from the bdf
> command into toto, replaceing any previous contents
>
> Try the commands 1 at a time.
>
> Regards,
>
> Ted.
> ================================================== ============
> | Ted Linnell <edlinnell@acslink.net.au> |
> | |
> | Nunawading, Victoria , Australia |
> ================================================== ============



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com