Search code examples
rpmrpm-spec

How to run a shell command in RPM spec file?


How do I run a shell command in spec file? I want to execute something similar like:

uname -r | sed s/(...stuff...)/(...stuff...)

Solution

  • If you need it in something like a %define or %global or a macro, you can use "%(shell_command)". Note () not {}.