Closed MostafaYA closed 11 months ago
Oh, sorry about that, the code was accidentally missing during code refactoring in v0.27.0.
$ echo -ne "a,b,c\n1,2,3\n" | csvtk mutate2 -e '$a+$c' -n x -w 0 --at 1
x,a,b,c
4,1,2,3
$ echo -ne "a,b,c\n1,2,3\n" | csvtk mutate2 -e '$a+$c' -n x -w 0 --after b
a,b,x,c
1,2,4,3
$ echo -ne "a,b,c\n1,2,3\n" | csvtk mutate2 -e '$a+$c' -n x -w 0 --before b
a,x,b,c
1,4,2,3
Thanks!
This problem is still not fixed with external variables which were introduced with #37.
val=ABC; echo -ne "a,b,c\n1,2,3\n" | csvtk mutate2 -e " '$val' " -n x --at 1
a,b,c,x
1,2,3,ABC
Thanks for reporting this. Previously, when the expression only contained constant strings or numbers, another simple workflow was used, in which I forgot to apply the position to insert.
Prerequisites
csvtk version
Describe your issue
csvtk version v0.27.2
column headers do not respond to flags
--at
--after
or--before
in themutate2
commandHere is the example from the manual
Thank 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).