![]() |
here is my menu script i wrote awhile back. i know its pretty boring but im bored and thought i should post something in here finally :)
menu :
#bin/shmenu.awk :
awk 'BEGIN { menu="************** MENU ****************\n"if you put both of these files in your /usr/bin/ dir you can just run the thing by typing menu anywhere you are :) |
Now there's an idea... if anyone wants my JavaScript/PHP/XML menu generator, let me know. Nice code, K.
|
create a thread and post it ;)
This menu system could be used when you dont want to give a user full access to the computer and only want to give them a few commands. you could set it up for when ever they ssh into the machine the menu automaticly runs and then with they exit the menu it could log out of the computer for them and then the only access they get is what you give them on the menu :) |
Sounds like a really good idea to me.
|
Looks pretty good man, I'm going to put it on my Fedora Core 3, Gentoo, Ubuntu, and Solaris 10 boxes to test it out for ya... maybe add a bit to it too.
Feelings are hurt cuz you don't have a "Compile C program" option... lol |
i couldnt think of anymore options to put into it but thats a good one. if you modify it let me know i would like to see what other options would be good to add to it :)
just figured this out if you add this to the users .profile file then it will run automaticly when they login via ssh :) ok i have added a compile c++ and c options and even a run a.out cause thats what the code compiles to on my computer when i dont get a specific name menu :
#bin/shmenu.awk :
awk 'BEGIN { menu="************** MENU ****************\n" |
Just added a few changes to the compile options to where you can put in a name for the binary that was created.
Changed the run a.out option to Run Program... so you can run any program you want (that you have perms to run). Also, removed the cd command from the top of menu.sh to make the menu work with the current directory or directory specified instead of defaulting to home directory. These are minor, trivial changes... that I needed for my "instance" of Big K's menu script. Good work man! menu.sh ----------- :
9)menu.awk ------------- :
|
| All times are GMT -5. The time now is 1:47 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC