Raised This Month: $ Target: $400
 0% 

execute linux commands?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wgitscht
New Member
Join Date: Apr 2005
Old 04-20-2005 , 07:30   execute linux commands?
Reply With Quote #1

is it possible to call unix / linux commands, as it is with e.g. c/c++/php and its exec() function?
i would really love to pipe some info to a running linux application and i would need something like this call_linux_func(" echo 'ddd' | linuxcommand -takes -some -paras ") it would be enough to just call the linux function though.
wgitscht is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-20-2005 , 13:53  
Reply With Quote #2

Code:
static cell AMX_NATIVE_CALL system_cmd(AMX *amx, cell *params) 
{ 
    int len; 
    char *cmd = MF_GetAmxString(amx, params[1], 0, &len); 
    system( cmd ); 

   return 1; 
}
From a post Suzuka made. Just slap that into a module and it should work. ;-)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
danny0085
New Member
Join Date: Mar 2011
Old 04-20-2011 , 16:01   Re: execute linux commands?
Reply With Quote #3

Here you can check out the most used linux commands .
danny0085 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode