I have a file with tab separated fields (6 of them). One of these fields is a string (field 3). I need to extract a substring and write it at the end of each string after a tab (at position 11). How do I do that? Separator is a symbol /, there are always 3 of them, and I need to extract what is after the second one and before the third one (ex. http://www.host.com/).
2 65 gf/jyhfkhjf/fg 0.5 657 hs
6745 6 lug/hgf/hgd 87 56 kg
The output I want:
2 65 gf/jyhfkhjf/fg 0.5 657 hs jyhfkhjf
6745 6 lug/hgf/hgd 87 56 kg hgf
I tried awk for a part of my work, assuming I only have a single field with a string.
awk -F/ '{print $3}'