chmod calculator script

so just spit ballin here,

i was wondering if anybody knew how to make a chmod calculator script.

basically go to this website

http://mistupid.com/internet/chmod.htm

i would like something like this that i can use in a terminal tho. so like i run the scrip and it ask for owner what permission , for group what permission, and for other what permission.

and it sums it up and give me the proper number to place when chmoding a file or directory.

this is so i can easly teach other ppl on what permission the file will need and what number is associated with that permission.

or something like that, i recall seeing this somewhere but i dont remember, does anybody know how to make this or know where to find this?

File permissions 101:

https://help.ubuntu.com/community/FilePermissions

I do not know of anyplace to get a script like the one you want. You will have to look at some webpages then get an idea how to roll your own.