var1to
var2
...
var50
var1,var2,...,var50then
SUM(var1,var2,...var50)is quite tedious.
I found this nice command line from http://www.shellhacks.com/ (in Linux, of course). Save your list in a file, say temp_file, then
echo $(awk 'NR > 1{print line", "}{line=$0;}END{print $0" "}' temp_file) > new_fileYour comma separated variable names are ready in new_file. Thanks, penguin.
No comments:
Post a Comment