From 8b50c699652e39812024af2c34973c6359302c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 6 Jun 2021 21:41:54 +0200 Subject: Read stdin if not a tty --- vpeval | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vpeval') diff --git a/vpeval b/vpeval index 4c5b785..3031cff 100755 --- a/vpeval +++ b/vpeval @@ -1,2 +1,7 @@ #!/bin/sh -echo "$(eval "$(sed '/^#/d')" 2>&1)" | sed 's/^/# /' +{ + if [ -z "$VPIN" ] + then eval "$(sed '/^#/d')" 2>&1 + else eval "$(sed '/^#/d')" 2>&1 <"$VPIN" + fi +} | sed 's/^/# /' -- cgit v1.2.3