I am trying to split the string in a file based on some delimiter.But I am not able to achieve it correctly... Here is my code below.
awk \'var=split($2,arr,
You don't need to call split. Just use \\ as field separator:
\\
echo 'a\b\c\d' | awk -F\\ '{printf("%s,%s,%s,%s\n", $1, $2, $3, $4)}'
OUTPUT:
a,b,c,d