When you use ! or :! Vim builds the invoking command based on whatever is specified in the various 'shell...' settings (i.e. 'shell', 'shellcmdflag', 'shellquote', to name three). On Unix systems the defaults for the first two are usually the default shell ($SHELL) and -c so if I'm using Bash and I do :!foo bar the call Vim makes will look like:
/bin/bash -c ...
Is there a way to see exactly what shell command is being called out?
To see what exactly is run,
will show vim's PID, e.g. 1234, with which you can then in another terminal run:
sudo strace -fe trace=execve -p 1234
then in vim you can use any shell-invoking command like:
and in the terminal running strace see something like:
It is a little bit faster to use a string expression than a lambda (and arguably easier to understand in this case),
call filter(a, 'index(b, v:val)<0')
This naive implementation is O(N^2) but is still fairly fast in practice as index() is implemented in C. If you have a very large number of elements in the RHS, it may be faster to use a pre-computed ...
An easy check is :!foo that (probably) will print something like bash: line 1: foo: command not found. Also see :h job_start() (or :h jobstart() for Neovim) and so on.
:! always uses &shell (as well as &shellcmdflag, &shellquote, &shellxqoute and so on);
:h system() and :h systemlist() use &shell in Vim; in Neovim it ...
When using a relative path, awk assumes the path is relative to the current directory. In the comments, you note that :pwd gives /home/user; that means you need to give either
an absolute path to denorm.awk, or
a path relative to /home/user (in general, relative to the :pwd)
As far as keeping the existing csv, you should use the filter syntax (:%!awk -f ...