file\" in the script, I dint understand the meaning, can any tell me what\'s the command doing?" />
开发者

shell scripts symbol ": >"

I m a newbie at shell scripting, recent开发者_StackOverflow中文版ly I saw a command ": > file" in the script, I dint understand the meaning, can any tell me what's the command doing?

Thanks, in advance


: is a no-op. > is a redirection, so the file is overwritten with the output from the no-op command (i.e. the file exists and is empty afterwards).


It creates and/or empties the file. The : command is a bash built-in that just does nothing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜