aboutsummaryrefslogtreecommitdiff
path: root/open-stdin
blob: 5c0ee1ec3daa42f8d5122f48a1b0e328342d73f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# Saves standard input in a download folder and opens it (spawn)
# Usage: open-stdin 
# Requires: open-file

#folder=$HOME/Downloads/open-stdin
folder=${TMPDIR:-/tmp}

tempfile=$(mktemp -p "$folder")

cat > "$tempfile" && open-file $@ "$tempfile"

Generated with cgit - Back to sebastiano.tronto.net