문제

I am not familiar with sed. Now I came accross the following line in a shell script:

sed 's|'`pwd`'||'

what does the line do? Does it replace || with something else?

도움이 되었습니까?

해결책

it removes any string that equals to current-working-directory in the input. because pwd may itself contain / instead of /, | used in sed command as pattern-delimiter.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top