I have a csv file whose second column has links in them, and in the 3 column for each link I would like to insert their domain names. I know that there is an AWK command to do this:
echo http://news.blogs.cnn.com/2013/04/15/explosions-near-finish-of-boston-marathon/?hpt=hp_t1 | awk -F/ '{print $3}'
And I would like to get the results on the third column for each URL. I tried doing this in R, but that didn't work, is there any other way I can do this? E.g. through the terminal?
EDIT: Or, how can I insert a variable into the system() call? So, something like, variable a has my URL and I want to call:
system("echo 'a' | awk -F/ '{print $3}'")