hi have in file the example line: (in file)
PATH: word1 /var/tmp word2 word3
how to rescue or match only “/var/tmp” PATH from the line by sed
remark: /var/tmp its only example , it could be any other path!
remark1: /var/tmp could be in the first line or in the end of the line or somewhere in the middle of line
for example
echo "PATH: word1 /var/tmp word2 word3" | sed ...
will print
/var/tmp
This does not work if you have directory names with spaces. Provide a more concrete example of the possible paths that you might have. best of all, tackle the root of the problem at the source, where you got your data from.