aboutsummaryrefslogtreecommitdiff
path: root/templess
blob: b06ace75d077989b3a213fa0a0933b013dddf78e (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

# Write standard in to a temporary file and sends it to a pager.
# This is used to be able to pipe the content displayed by less to
# an external program.

pager=${PAGER:-less}
tempfile=$(mktemp)

cat > "$tempfile" && $pager "$tempfile" 

Generated with cgit - Back to sebastiano.tronto.net