-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What do you need to do to run this script, or one like it?  I tried
adding a #!/bin/sh to the beginning, but it just chokes.  I have
installed perl, but never really used it, so if it's a perl script,
how do I run it?

- -----Original Message-----
From: Carlo Feliciano N. Aureus [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 12, 2003 1:31 AM
To: [EMAIL PROTECTED]
Subject: RE: backup script



Hi, 

I usually use below script to backup every directory, which are under
SOURCE DIRECTORY, in a tar.gz format and store them in my backup
directory.

- ---------------------------------------
BACKUP_DIRECTORY=<Your backup directory>
SOURCE_DIRECTORY=<Your source directory>

cd $SOURCE_DIRECTORY
for i in * ; do tar cvfz "$BACKUP_DIRECTORY/$i.tgz" $i ;done
- ----------------------------------------



Hope this helps.

Cheers,
Carlo Feliciano N. Aureus
Information and Communication Technology Center
Ateneo de Naga University
4400 Naga City Philippines
(+63 54) 4726810


- -----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Steve Buehler
Sent: Friday, March 28, 2003 9:06 AM
To: [EMAIL PROTECTED]
Subject: backup script

RedHat Linux 7.3
I am trying to create a backup script (/bin/sh type) that would read
the

directories and create a seperate backup file for each directory.  I
can

easily get the directories into a text file with "ls -d *".  How can
I
run 
through that script one line at a time putting the contents of the
line 
into a variable, then do something with it?

foreach line in file{
        $variable="line contents"
        run some commands that need $variable contents
}

Thank You in advance for any help.

Steve



- -- 
This message has been scanned for viruses and
dangerous content by the MailScanner at ow5, and is
believed to be clean.



- -- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list



- -- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBPor9rNPjBkUEZx5AEQJurQCg4IWi0OnsmpUGncgCxPPHfw5nKjgAoKJC
jLtWAJEYbTPJvKwfQSEiurXg
=wKip
-----END PGP SIGNATURE-----



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to