You can pipe it to another cut
, using /
as the field separator:
cut -f2 file | cut -f1 -d/
Or you could use sed
to cut off everything beyond /
:
cut -f2 file | sed 's?/.*??'
Or you could use a single awk
with a custom field separator, assuming there are no /
in the first field:
awk -F'[\t/]' '{print $2}' file
If there can be /
in the first field then it's better to use the first two suggestions.