In the code below:
#!/bin/bash
echo AAAAAA > a.txt
echo BBBBBB > b.txt
echo CCCCCC > c.txt
files="a.txt b.txt c.txt"
tar -cvf archive1.tar $files # this line works
tar -cvf archive2.tar "$files" # this line doesn't work - why???
the first tar command works fine, but the 2nd tar line, with "$files" does not. Why is this?