dreamwest Posted May 20, 2009 Share Posted May 20, 2009 Ive searched for hours on how to actually run/execute a bash script on linux. Do i run it in my browser or do i need root access of the server and run it through something like putty Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/ Share on other sites More sharing options...
Daniel0 Posted May 20, 2009 Share Posted May 20, 2009 You run it from command line. Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838001 Share on other sites More sharing options...
dreamwest Posted May 20, 2009 Author Share Posted May 20, 2009 You run it from command line. Ok i have no idea how to run a command line on linux Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838004 Share on other sites More sharing options...
Daniel0 Posted May 20, 2009 Share Posted May 20, 2009 Well, you do it the same way on Windows. You just type the command and it executes. Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838006 Share on other sites More sharing options...
dreamwest Posted May 20, 2009 Author Share Posted May 20, 2009 Do i need shell access, cause the server im using is shared. I have cpanel installed can i do it through this?? Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838008 Share on other sites More sharing options...
zq29 Posted May 20, 2009 Share Posted May 20, 2009 Do i need shell access Yes Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838011 Share on other sites More sharing options...
dreamwest Posted May 20, 2009 Author Share Posted May 20, 2009 Heres a list of directories i can access on my server through ftp public_html tmp public_ftp www bash_history bash_logout bash_profile bashrc contactemail ftp_quota lang last_login pearrc zshrc php mail bin ssh access_logs and a few other misc stuff Can i do something with this Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838017 Share on other sites More sharing options...
zq29 Posted May 20, 2009 Share Posted May 20, 2009 Can i do something with this No Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838019 Share on other sites More sharing options...
dreamwest Posted May 20, 2009 Author Share Posted May 20, 2009 Can i do something with this No I was checking my cpanel, apparently they do have it but my server has it switched off. Dammit...looks like ill be a script kiddie for some time Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838021 Share on other sites More sharing options...
RichardRotterdam Posted May 21, 2009 Share Posted May 21, 2009 [quote author=dreamwest link=topic=253079.msg1188769#msg1188769 date=1242819173 Do i run it in my browser or do i need root access of the server and run it through something like putty The question you should ask your self is "why do I want to run this bash script". If you want to run it by calling a url in your browser you could use php using the exe function Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838777 Share on other sites More sharing options...
dreamwest Posted May 21, 2009 Author Share Posted May 21, 2009 [quote author=dreamwest link=topic=253079.msg1188769#msg1188769 date=1242819173 Do i run it in my browser or do i need root access of the server and run it through something like putty The question you should ask your self is "why do I want to run this bash script". If you want to run it by calling a url in your browser you could use php using the exe function Im on a mission to learn every available programming language i can - Its my hobby I didnt know you can run shell commands with a function Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838791 Share on other sites More sharing options...
RichardRotterdam Posted May 21, 2009 Share Posted May 21, 2009 The question you should ask your self is "why do I want to run this bash script". If you want to run it by calling a url in your browser you could use php using the exe function Im on a mission to learn every available programming language i can - Its my hobby I didnt know you can run shell commands with a function Then you're better of installing linux, freeBSD or anything else that runs bash on one of your computers and use a terminal. Using a webserver to learn bash isn't really gonna cut it Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838797 Share on other sites More sharing options...
dreamwest Posted May 21, 2009 Author Share Posted May 21, 2009 Then you're better of installing linux, freeBSD or anything else that runs bash on one of your computers and use a terminal. Using a webserver to learn bash isn't really gonna cut it Ok - will do. Ill do some searching tonight on how to set it up Link to comment https://forums.phpfreaks.com/topic/158893-bash-scripts/#findComment-838799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.