Help with awk printout

I want to represent the columns by whats in a txt file. So the columns.txt file contains "$2$3" and the test.txt file contains "bob tom jones jon"

I have

#!/bin/bash

columnsVar=`cat columns.txt`
echo "Columns edited: $columnsVar"

awk ' {print $columnsVar }' test.txt

But it prints out all the columns.

Also, something like this just gives me an error

awk ' {print `cat columns.txt` }' 

Any suggestions?

I could suggest a solution using cut. If you change the file columns.txt to look something like "2,3", or if the format is fixed you could consider reformating "$2$3" to "2,3".

so then

> echo "columnsVar"
2,3

> cut -d' ' -f$columnsVar test.txt
tom jones

I hope this is what you're looking for...