Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Backup script: output redirection
@ 2002-10-25 16:51 Dub
  2002-10-26  2:03 ` ScriptOmatic
  0 siblings, 1 reply; 4+ messages in thread
From: Dub @ 2002-10-25 16:51 UTC (permalink / raw)


Hi,

This is a very simple question, it deals more with shell programming
than with Tru64. Anyway, I'm sure some of you have a working variant.

I have a script with many vdump command (backup of all filesystems).

backup.sh:
vdump ...
vdump ...

I'd like to get copy of the output (actually file list) in one file,
named list.$DATE  (I know how to get date in a variable).

Many thanks in advance for sharing a compact nice variant!

BR,
Dub


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Backup script: output redirection
  2002-10-25 16:51 Backup script: output redirection Dub
@ 2002-10-26  2:03 ` ScriptOmatic
  2002-10-28  7:47   ` Dub
  2002-10-28  7:47   ` Dub
  0 siblings, 2 replies; 4+ messages in thread
From: ScriptOmatic @ 2002-10-26  2:03 UTC (permalink / raw)


Dub wrote:
> 
> Hi,
> 
> This is a very simple question, it deals more with shell programming
> than with Tru64. Anyway, I'm sure some of you have a working variant.
> 
> I have a script with many vdump command (backup of all filesystems).
> 
> backup.sh:
> vdump ...
> vdump ...
> 
> I'd like to get copy of the output (actually file list) in one file,
> named list.$DATE  (I know how to get date in a variable).
> 
> Many thanks in advance for sharing a compact nice variant!
> 
> BR,
> Dub

If I understand what you want ...

backup.sh:

#! /bin/sh

LIST=list.$DATE; # you got that part you say
(
vdump ...
vdump ...
) > ${LIST} 2>&1



OR TO HAVE BOTH USE tee

(
.... same stuff 
) 2>&1 | tee [-a] $LIST  # -a for append, probably you know, eh?


-- 
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Backup script: output redirection
  2002-10-26  2:03 ` ScriptOmatic
@ 2002-10-28  7:47   ` Dub
  2002-10-28  7:47   ` Dub
  1 sibling, 0 replies; 4+ messages in thread
From: Dub @ 2002-10-28  7:47 UTC (permalink / raw)


> LIST=list.$DATE; # you got that part you say
> (
> vdump ...
> vdump ...
> ) > ${LIST} 2>&1

Thank you so much! The key point was using round brackets to select
the same output direction for many commands. It's nice!

BR,
Dub


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Backup script: output redirection
  2002-10-26  2:03 ` ScriptOmatic
  2002-10-28  7:47   ` Dub
@ 2002-10-28  7:47   ` Dub
  1 sibling, 0 replies; 4+ messages in thread
From: Dub @ 2002-10-28  7:47 UTC (permalink / raw)


> LIST=list.$DATE; # you got that part you say
> (
> vdump ...
> vdump ...
> ) > ${LIST} 2>&1

Thank you so much! The key point was using round brackets to select
the same output direction for many commands. It's nice!

BR,
Dub


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-28  7:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-25 16:51 Backup script: output redirection Dub
2002-10-26  2:03 ` ScriptOmatic
2002-10-28  7:47   ` Dub
2002-10-28  7:47   ` Dub

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox