[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help with scripting



Newbie question. I am running a system where users have various directories in a tree structue which at some levels is predetermined and at other levels is not .  What I need to do is work out how much users are using thIs system.  I am not an adminstrator, but I run this part of the system.   The tree structure is:

/fix1/user1/fix2/user2/fix3

where fix1 and fix3 are the same for all users, and fix2 can take 2 predetermined fixed values.  User1 is the user name and user2 is a name the user determines (there can be unlimited numbers of these).

I want to write some sort of a script that will work out the number of user2 directories each user has, and the number of files each user has. Files are only stored at the lowest directory level, ie, fix3.

Can someone advise me where to start?  Shell script?  Awk?perl? Etc.  And point me to useful documentation (and where to find it). Many thanks! I've had a look at manual pages for awk and perl but I need more of a beginners overview... And preferably some examples reasonably close to the kind of thing I'm after.






Reply to: