Taking Substring from Column to grab text until 3rd occurrence of '/'

I have searched everywhere but couldn’t quite find the exact similar solution to my problem. In Bash, I have a file that is tab delimited. It can potentially have several million lines. In the 27th column there is a string of colors which is delimited by a forward slash. My end goal is for the… Read More Taking Substring from Column to grab text until 3rd occurrence of '/'

Use awk to repeat first column in CSV with unknown amount of columns

I’m trying to create a 2 column CSV, where the first column is a name, and the second column is the value. I am able to do this with a nested loop, but I’m positive that AWK can do this much faster DATA=’POLICY_NAME01,VM001,VM002,VM003 POLICY_NAME02,VM004 POLICY_NAME03,VM005,VM006′ IFS=$’\n’ for LINE in $DATA; do POLICY=$(echo "${LINE}" | cut… Read More Use awk to repeat first column in CSV with unknown amount of columns