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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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/ |
| |||
| 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 > > |
| |||
| "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 | ================================================== ============ |
| ||||
| 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 | > ================================================== ============ |