awk '{print $9}' the last ls -l column including any spaces in the file name

后端 未结 7 1293
星月不相逢
星月不相逢 2020-12-29 08:13

How would I get awk to output the whole file name in ls -l if some of the files have spaces in them. Usually, I can run this command:



        
相关标签:
7条回答
  • 2020-12-29 08:33

    Just for completion. It can also be done with sed:

    # just an exercise in regex matching ...
    ls -l | sed -E  -e '1d; s/^([^ ]+ +){8}//' 
    
    0 讨论(0)
提交回复
热议问题