1 2 3 4 5 6 7 8 9 10
#!/bin/sh set -eu tempfile=$(mktemp) echo "$1" > "$tempfile" ret=0 ssh-add -d "$tempfile" || ret=1 rm "$tempfile" exit $ret