It's companion, called dirname, returns the "other" part of the path that basename throws away.
它的相关命令dirname返回basename丢弃的“另”一部分路径。
Each path element contains a single dirname element, so the code searches for elements named dirname and grabs the first entry.
每个path元素包含了一个dirname元素,所以代码搜索名称为dirname的元素,并获取其中的第一个条目。
While basename and dirname are great tools, there are times where we may need to perform more advanced string "chopping" operations than just standard pathname manipulations.
尽管basename和dirname是很好的工具,但有时可能需要执行更高级的字符串“截断”,而不只是标准的路径名操作。
While basename and dirname are great tools, there are times where we may need to perform more advanced string "chopping" operations than just standard pathname manipulations.
尽管basename和dirname是很好的工具,但有时可能需要执行更高级的字符串“截断”,而不只是标准的路径名操作。
应用推荐