Cutting something between quotes (linux)

jfall

Diamond Member
Oct 31, 2000
5,975
2
0
Say I have grepped a file and the output is "test" -- how can I remove the quotes from it using grep, cut, awk or sed assuming that the word between quotes is not always going to be the same
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
s/"//g; <--- stick that in whatever regex engine you're using. It replaces quotes with nothing.
 

jfall

Diamond Member
Oct 31, 2000
5,975
2
0
That doesn't seem to want to work, I think the quotes are messing it up