Sed select value of parameter -


i need extract value using sed command; have file, contains this:

field="value" 

the result needs be: value

try

#!/bin/sh                                                                                                                                     sed -n 's/field="\(.*\)"/\1/p' 

this looks lines have field=

if finds them, removes except value, , prints value. otherwise, prints nothing.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -