Hello everyone,
this time I have a problem with script which should read file names.
My backup script for SVN generating such a files:
Quote:
#! folder_with_repositories+repositoryname.tgz
|
where foldername means directory with repositories.
in the linux directory tree it looks like this:
Quote:
/svn/folder_with_repositories
|
|
- repositoryname
|
- repositoryname01
|
- etc. etc.....
|
In my restore script I would like to read a part of the backup file name.
First I would like to ready part till "+" and then part after "+".
So, using the name of the backup file I would like to restore SVN directory tree.
If file has a name:
INPUT
Quote:
#! folder_with_repositories+repositoryname.tgz
|
I would like to have a command which will create folder using backup file name.
OUTPUT
Quote:
/svn/folder_with_repositories
|
|
- repositoryname
|
Name till "+" means folder with repositories.
Name after "+" maens folder with repository.
Do You know how can I do this ? AWK ?
Extensions .tgz from the file should be droped.
help...