I'm struggling with passing arguments read from the minibuffer to a shell command in a elisp function.
I've written the following so far:
(defun perlclean (review clean)
"Script PERL blablabla"
(interactive "Foriginal: \nFclean: ")
(with-current-buffer
(shell-command
"perl -pe 's/\\q\{.*} ( \{ ( (?: [^}{]+ | (?1))*+ ) \} )/$2/gx' %s\\ \\>\\ %s" review clean)))
The idea is to pass the first file (called review
) through this perl
command to get the so-called clean file.
I want to specify the name of both files (that could not exist, that's why I used F
).
The present version of this script asks me for both paths/names but ended with Wrong type argument: stringp,255
.
I work on Linux-Ubuntu.