看到这个帖子
http://www.cn-dos.net/forum/viewthread.php?tid=25333 就想着写了个 ruby & cmd 的
#!/usr/bin/ruby
@rem = <<CMDSHELL
@echo off
cls
for %%? in (ruby.exe) do if not *%%~$PATH:?==* ruby.exe "%~f0" %*
exit/b
CMDSHELL
#ruby code
print "ruby run in shell bash/cmd , 参数:" ; $*.each {|i| print '"'+i+'" '}
__END__
Last edited by vkill on 2007-12-8 at 09:29 AM ]