请教关于Common Lisp(SBCL) 写Linux环境下的脚本

116 views
Skip to first unread message

Simon

unread,
Feb 21, 2016, 3:56:34 AM2/21/16
to Lisp中文社区邮件列表
Dear ALL:
小弟新近学习Lisp(Common Lisp)
现有问题:Lisp在linux下如何调用系统命令(cd、touch、rsync)?
万望不吝赐教,拜谢。。。


薛书猛

Vito Van

unread,
Feb 21, 2016, 4:02:47 AM2/21/16
to Lisp中文社区邮件列表

--
--
Lisp-cn(Lisp中文用户组)
CLUG http://lisp.org.cn

---
您收到此邮件是因为您订阅了 Google 网上论坛的“Lisp-cn(Lisp中文用户组)”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到lisp-cn+u...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout

宋为

unread,
Feb 21, 2016, 5:13:34 AM2/21/16
to lis...@googlegroups.com
太狠了……

标准里面没有定义如何执行外部命令,所以根据不同的Common Lisp实现,有不同
的姿势。

就SBCL而言,有一个|sb-ext:run-program可以用。|

在 2016年02月21日 17:02, Vito Van 写道:
> 1: 翻墙
> 2: http://lmgtfy.com/?q=common+lisp+execute+shell+command
>
>
> On Sun, Feb 21, 2016 at 4:57 PM 'Simon' via Lisp-cn(Lisp中文用户组)
> <lis...@googlegroups.com <mailto:lis...@googlegroups.com>> wrote:
>
> Dear ALL:
> 小弟新近学习Lisp(Common Lisp)
> 现有问题:Lisp在linux下如何调用系统命令(cd、touch、rsync)?
> 万望不吝赐教,拜谢。。。
>
>
> 薛书猛
>
> --
> --
> Lisp-cn(Lisp中文用户组)
> CLUG http://lisp.org.cn
>
> ---
> 您收到此邮件是因为您订阅了 Google 网上论坛的“Lisp-cn(Lisp中文用户
> 组)”群组。
> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到lisp-
> cn+unsu...@googlegroups.com
> <mailto:lisp-cn%2Bunsu...@googlegroups.com>。
> 要查看更多选项,请访问 https://groups.google.com/d/optout
>
> --
> --
> Lisp-cn(Lisp中文用户组)
> CLUG http://lisp.org.cn
>
> ---
> 您收到此邮件是因为您订阅了Google网上论坛上的“Lisp-cn(Lisp中文用户组)”
> 群组。
> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到lisp-
> cn+unsu...@googlegroups.com
> <mailto:lisp-cn+u...@googlegroups.com>。
> 要查看更多选项,请访问https://groups.google.com/d/optout

Simon

unread,
Feb 21, 2016, 8:36:34 AM2/21/16
to lis...@googlegroups.com
哪里太狠了?
据上所述,我找到了这个:http://www.sbcl.org/manual/
多谢!!!

宋为

unread,
Feb 21, 2016, 8:34:44 PM2/21/16
to lis...@googlegroups.com
就我浅薄的经验,我觉得通读手册是很有帮助的,不仅是在SBCL的使用上,还能让
你理解其他实现是怎么使用的。

“太狠了”是指Van的那个“let me google that for you”,略有些粗暴。╰(*°▽°*)╯

huang ying

unread,
Apr 19, 2016, 8:58:10 AM4/19/16
to lis...@googlegroups.com
2016-02-21 16:56 GMT+08:00 'Simon' via Lisp-cn(Lisp中文用户组)
<lis...@googlegroups.com>:
你也可以试以下小弟的拙作,

https://github.com/hying-caritas/hysh

不仅可以调用系统命令,还可以IO重定向,写pipeline

Best Regards,
Huang, Ying

1.618

unread,
Dec 26, 2019, 6:18:12 AM12/26/19
to Lisp-cn(Lisp中文用户组)
sb-ext:run-program

在 2016年2月21日星期日 UTC+8下午4:56:34,Simon写道:

Liutos

unread,
Dec 26, 2019, 9:21:13 PM12/26/19
to lis...@googlegroups.com
可以用 roswell,参见 GitHub 上的 README 文档中的这一节:https://github.com/roswell/roswell#scripting-with-roswell

1.618 <zhang1....@gmail.com> 于2019年12月26日周四 下午7:18写道:
--
--
Lisp-cn(Lisp中文用户组)
CLUG https://lisp-cn.com
---
您收到此邮件是因为您订阅了Google网上论坛上的“Lisp-cn(Lisp中文用户组)”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到lisp-cn+u...@googlegroups.com
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/lisp-cn/2b790ec9-d201-46e7-b762-560ecaa20572%40googlegroups.com


--
Liutos Love Linux LaTeX Lisp Ling

我的GitHub主页:https://github.com/Liutos
Reply all
Reply to author
Forward
0 new messages