I am trying to create a file to then view in excel. I am extracting data from one file (comma seperated) and sending the required fields to another in a .ksh shell script
the below works fine but if I want to put a single quote (') before $2 how is this done? I've tried various ways and get syntax errors saying its unmatched
OK :-
cat dummydata | awk -F, '{ print $1"\t"$2"\t"$3"\t"$4 }' >> ${FILE}_${TIMESTAMP}.xls
Gives errors :-
cat dummydata | awk -F, '{ print $1"\t'"$2"\t"$3"\t"$4 }' >> ${FILE}_${TIMESTAMP}.xls
the below works fine but if I want to put a single quote (') before $2 how is this done? I've tried various ways and get syntax errors saying its unmatched
OK :-
cat dummydata | awk -F, '{ print $1"\t"$2"\t"$3"\t"$4 }' >> ${FILE}_${TIMESTAMP}.xls
Gives errors :-
cat dummydata | awk -F, '{ print $1"\t'"$2"\t"$3"\t"$4 }' >> ${FILE}_${TIMESTAMP}.xls