TA的每日心情 | 衰 2020-8-15 10:40 |
|---|
签到天数: 146 天 [LV.7]常住居民III
|

楼主 |
发表于 2020-10-19 16:16:55
|
显示全部楼层
jonah_w 发表于 2020-10-19 00:54/ c! \' o0 L3 a/ [; |1 f. H
感谢zzz_sleep回复。
+ V$ j+ t8 P* @ ~我试了下上面的这个shell文件:
f9 v* Y/ H! o. \4 S9 I./title.sh "test title" "test description"
( Z2 e1 Z. m/ O6 I, @" H$ ~- N o* V换行?不能呀,正常不会换行的,用 bash 试试
& w( P. z6 H- ~6 |, h4 d- bash ./title.sh "test title" "test description"
复制代码 9 H6 O( t" e1 g: H: X I$ e7 F+ M3 B- j
7 g5 B+ C1 m& a+ D4 T
$@ 表示后续所有参数,在这个例子里指除了 title 和 description 外,其他参数
6 `7 n& e. b/ s1 c+ ^7 ?/ b- S. ~1 K; u1 b% y) b$ K, u( G
这个例子可以作为 mdict 的一个变种
( Y+ S/ b' W; W x6 r! P+ o- F
5 |. O( }& m7 h6 }- c用法:
* ~7 T. N8 c z+ u, obash title.sh "title" "desc" [mdict 其他参数]...6 r* M$ [& \; X X
7 R4 D" H* m% E |
|