I'm having a problem to grep specific keyword and its content. This is sample file, the actual file is larger than this.
Example
user@linux:~$ cat url.txt
abcrandomtextdef another random text blablabla
another random iwantthis text abcrandomtextdef url=https://www.google.com ghirandomtextjkl
ghirandomtextjkl another random text yadayada
wxyz iwantthis abcdef url=yahoo.com yaday
user@linux:~$
Desired output would be like this.
iwantthis url=https://www.google.com
iwantthis url=yahoo.com
These are my attempts to get that output, but as you can see it didn't really work.
user@linux:~$ grep url= url.txt | cut -d ' ' -f3,6
iwantthis url=https://www.google.com
abcdef
user@linux:~$