$ awk -F/ -v OFS=/ '/info/{$1=$NF="";print}' urfile
/srv/add/ff/gg/hh/56/477/6517477/1987784/book/
$ sed '/info:/! d;s/^[^/]*//;s/[^/]*$//' urfile
/srv/add/ff/gg/hh/56/477/6517477/1987784/book/
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |