Hi all, I have a table like this
_time | file1.txt | file2.txt | file3.txt | *.txt |
1472160022 | 1472160022 | 1472160000 | 1472160099 | ... |
1472160024 | 1472160100 | 1472160300 | 1472160040 | ... |
... | ... | ... | ... | ... |
The filename columns are all of the format *.txt but there are so many and they can change in the future that I don't want to hardcode them.
I would like to subtract the *.txt from the the _time column
I basically want to do
eval *.txt = _time-*.txt
Which would theoretically give these values:
_time | file1.txt | file2.txt | file3.txt | *.txt |
1472160022 | 0 | 22 | -77 | ... |
1472160024 | -76 | -276 | -16 | ... |
... | ... | ... | ... | ... |
But I can't seem to wildcard in the subtraction in the eval. Any ideas are much appreciated!
Hi @Rjbeckwith,
Please try below;
| foreach "*.txt" [eval "<<MATCHSTR>>.txt" = _time - '<<FIELD>>' ]
Hi @Rjbeckwith,
Please try below;
| foreach "*.txt" [eval "<<MATCHSTR>>.txt" = _time - '<<FIELD>>' ]
Try foreach *.txt to apply and operation to each field matching *.txt