我有一个文件,内容如下,
/hello/dir1/dir2/remove_til_here/code/dira/dir1/a.c
/hello/dir1/dir2/remove_til_here/code/dirb/dir7/b.c
/hello/dir1/dir2/remove_til_here/code/dirc/dir3/c.c
/hello/dir1/dir2/remove_til_here/code/dird/dir2/d.c
......
我想要 o/p 如下:
code/dira/dir1/a.c
code/dirb/dir7/b.c
code/dirc/dir3/c.c
code/dird/dir2/d.c
我想避免/hello/dir1/dir2/remove_stil_here/
所有线路中的字符串。请对此有所了解。我试过了,cat file | awk '{print $5}'
但是没有用,提前谢谢!