Closed MostafaYA closed 1 year ago
Thanks! It worked.
Another question: how can mutate2 accept column name with space.
Here is an example
$ echo -e "one,two\na1,a2\n,b2\na2," \
| csvtk rename -n "one one" -f 1 \
| csvtk mutate2 -n three -e '$1 ?? $2' \
| csvtk pretty
one one two three
------- --- -----
a1 a2 a1
b2 b2
a2 a2
This does not work!
echo -e "one,two\na1,a2\n,b2\na2," \
| csvtk rename -n "one one" -f 1 \
| csvtk mutate2 -n three -e '$"one one" ?? $two' \
| csvtk pretty
[ERRO] Invalid token: '$'
[WARN] csvtk pretty: skipping empty input file: -
${one one}
csvtk mutate2 -h
Variables formats:
$1 or ${1} The first field/column
$a or ${a} Column "a"
${a,b} or ${a b} or ${a (b)} Column name with special charactors,
e.g., commas, spaces, and parentheses
谢谢 :)
Prerequisites
csvtk version
Describe your issue
Hi, something has been changed in
csvtk mutate2
version 0.27.0. It gives errors when use column namesThank you
I'm grateful to users who have greatly helped to report bugs and suggested new features.
I may respond to issues or fix bugs quickly, but I usually implement new features periodically (two or more weeks).