[rescue] shell script question
Nick Kociuk
rescue at sunhelp.org
Fri Oct 26 11:54:19 CDT 2001
this is really only specifically sun-related in that i'm using solaris,
and this seemed like less of a geeks-list question.
anyway, i've been futzing around for the past hour or so trying to write
what i'm certain should be a simple shell script, but i'm getting no
where quickly. a simple web search turned up nothing that i didn't
already know.
what i'm tring to do is this:
i've got a bunch of directories (actually, some are symlinks, but that
should be easy enough to handle)
/foo/bar1/.../RCS
/foo/bar2/.../RCS
and i'd like to rename the RCS leaf directories to RCS.old, this part
is pretty simple... but i also want to create new sym-links in their
place. ie:
/foo/bar1/.../RCS -> /new/bar1/.../RCS
so the name of the link target is the same except for the first
directory name. this is where i'm running into problems, since my
string parsing/tokenizing skills are quite lacking when it comes to shell
scripts.
i'd appreciate any pointers/suggestions as to how to go about doing
this. thanks.
More information about the rescue
mailing list