Unix / Linux Shell: Get Third Field Separated by Forward Slash (/) Delimiter
To extract the third field separated by forward slash (/) delimiter in Unix/Linux shell, you can use the following command: echo “field1/field2/field3/field4” | awk -F’/’ ‘{print $3}’ This uses the awk command to split the input string on forward slashes (/) and then prints the third field ($3). The -F option is used to specify … Read more