[H-GEN] Creating a directory in a group of /usr/username directories
Steven Lawrance
steven at sia.net.au
Sat Oct 30 00:17:58 EDT 1999
[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]
On Sat, Oct 30, 1999 at 01:50:56PM +1000, Hilton Travis wrote:
> I need to be able to create a directory called "tutorials" inside all the
> /usr/student/dipmm01 to /usr/student/dipmm20 accounts on an SGI Origin 2000.
> Without manually creating this directory in each user's home, is there any
> perl or awk script that can achieve this?
Use your shell. Something like:
cd /usr/student
for user in dipmm??; do mkdir ${user}/tutorials; chown $user ${user}/tutorials
done
> It look slike I should learn one of these languages. Which one (NOT
> FLAMEBAIT) would be the best for this sort of application - creating
> directory structures?
I'd suggest you learn a little awk anyway, it's quite handy from time to time.
Have a read of O'Reilly's ``sed & awk''.
HTH
-stl
--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.
More information about the General
mailing list