I have a file like this -
1,[test1] Joe,OK
2,[test2] Jack,OK
3,[test3] Tom,FAIL
I am printing the file like this -
cat file | awk -F"," '{ print "||" $1 "||" $2 "||" $3 "||" }'
I would like the output file like this -
|| 1 || Joe || OK ||
|| 2 || Jack || OK ||
|| 3 || Tom || FAIL ||
i.e. [test1] Joe is modified to Joe how can we do something like this on each column.
echo "[test1] Joe" | sed 's/\[.*\]\s//g'
Which gives me only Joe how can I combined this with the other columns?