从手册:
Shell Function Definitions ... name () compound-command [redirection] function name [()] compound-command [redirection]
name在其他地方定义:
name A word consisting only of alphanumeric characters and under‐ scores, and beginning with an alphabetic character or an under‐ score. Also referred to as an identifier.
因此,连字符无效。但是,在我的系统上,它们确实可以工作…
$ bash --versionGNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)