FSM*_*axB 2 linux bash command function
我即将学习bash脚本并编写一个这样的小脚本用于测试目的:
#!/bin/bash
function time {
echo $(date)
}
time
Run Code Online (Sandbox Code Playgroud)
However the function doesn't get executed, instead the command time is running.
So what do I have to do to execute the function instead?
I'm running bash 4.2.45
要运行与特殊关键字同名的函数time,请引用它,例如:
function time {
echo "$(date)"
}
'time'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1922 次 |
| 最近记录: |