He is a nice guy. "Rob" doesn't like it though.
How to extract Rob from this line using shell script?
He is a nice guy. "Rob" doesn't like it though.
How to extract Rob from this line using shell script?
This is a way of doing it, the first that came to my mind:
echo "He is a nice guy. \"Rob\" doesn't like it though" | cut -d'"' -f2
Of course it could have been done with sed or awk.
Is this homework?
$ echo "He is a nice guy. \"Rob\" doesn't like it though." | gawk -F'"' '{print $2}'
Rob
Here is another solution, try this
echo "ROB" | tr ""''
The first two "" are double quotes and the last two are single quotes