cut 从/a/b/c/d/e获取/a/b/c

https://www.cnblogs.com/chenxiaomeng/p/10066821.html

 

two_dir=`echo /a/b/c/d/e/f | cut -d"/" -f 2,3`  #获得a/b

  

posted @ 2019-07-31 17:25  lililili——  阅读(218)  评论(0)    收藏  举报