RE: script problem
- From: "Steven Buehler" <steve@xxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 13:30:19 -0600
-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-
bounces@xxxxxxxxxx] On Behalf Of Jerry Queirolo
Sent: Thursday, December 13, 2007 12:57 PM
To: General Red Hat Linux discussion list
Subject: Re: script problem
I have a backup script that I wrote. In it I have a variable thatof
has listings of directories to back up. Because of some of the sizes
thewhere I
directories, and for other reasons, they now want me to break them
back them up into multiple files with the name of the directoryinstead of
all in one file. It would be simple except that I can't find how toget
just the final directory name for each directory.
Example:
DIRSTOBACKUP= "/usr/local/bin
/etc
/home/steve
/usr/local/src"
If you just want your results to end up as bin.tar.gz, etc.tar.gz,
steve.tar.gz etc for your example below, can't you just use basename ?
Most cases that would work. But if we have a /usr/local/bin and a /bin
directory that we are backing up, then that wouldn't work correctly. So I
now have it changing the "/" into an underscore. So /usr/local/src would be
usr_local_src.tgz
Thank You
Steve
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- References:
- script problem
- From: Steven Buehler
- Re: script problem
- From: Jerry Queirolo
- script problem
- Prev by Date: RE: Checking thew ststus of a file
- Next by Date: RE: script problem
- Previous by thread: Re: script problem
- Next by thread: Re: script problem
- Index(es):