# `pp(1)` a preprocessor `pp(1)` allows embedding [`sh(1)`](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html) code in files of any type by nesting it inside the `#!\n` token, where `\n` is a new line. That means that if you'd like a simple loop or an `if` inside an HTML file for instance, you could use `pp(1)`. ## Basic usage For the following code: pp(1) example `pp(1)` outputs: pp(1) example ## Arguments You can also pass arguments to it by appending them to the command call: $1

#! echo $2 #!

Calling the above code with `pp tmp.upphtml 'pp(1) example' 'hello, world'` will result in: pp(1) example

hello world

## Pipes `pp(1)`'s `stdin` is sent to the child [`sh(1)`](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html) pp(1) example

#! cat #!

`echo 'hello, world' | pp tmp.upphtml` will output: pp(1) example

hello, world

## Debugging `pp(1)` also takes an optional `-d` flag. If passed, `pp(1)` will dump the generated [`sh(1)`](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html) code instead of executing it: pp(1) example `pp -d tmp.upphtml` will output: echo " pp(1) example " ## Example pp(1) Home #! addcls() { sed "s///g" } smu README | addcls #!

Files

Download

pp.tgz ## See also * * *