Have a string as below in a file.
"
"
using grep below commands with grep commands but able to get one string at a time, not able to append.
how to get output as :
thanks
"
Code:
anohter boy has id 000921 and girl has id=655 of roll number
using grep below commands with grep commands but able to get one string at a time, not able to append.
Code:
less <filename> | grep -o -P '(?<=id ).*(?=and )'
Code:
less <filename> | grep -o -P '(?<=id\= ).*(?=of )'
Code:
000921 655