私はファイルを持っています、内容は以下のようなものです、
/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}'
、役に立たないので、よろしくお願いします!