projects
/
BK-2020-03.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat(user/bkfeh):Add wrapper for feh
[BK-2020-03.git]
/
unitproc
/
bkt-read_stdin_psarg
diff --git
a/unitproc/bkt-read_stdin_psarg
b/unitproc/bkt-read_stdin_psarg
index 50f76a712358540597320d689c77c9f3790bfc1a..d29e89ac0e743340f48bc0749c8e9594618e535a 100644
(file)
--- a/
unitproc/bkt-read_stdin_psarg
+++ b/
unitproc/bkt-read_stdin_psarg
@@
-1,4
+1,5
@@
#!/usr/bin/env bash
#!/usr/bin/env bash
+# Desc: Reads stdin and positional arguments
yell() { echo "$0: $*" >&2; } # print script path and all args to stderr
die() { yell "$*"; exit 111; } # same as yell() but non-zero exit status
yell() { echo "$0: $*" >&2; } # print script path and all args to stderr
die() { yell "$*"; exit 111; } # same as yell() but non-zero exit status
@@
-10,6
+11,7
@@
read_stdin_psarg() {
# Output: stdout (newline delimited)
# Example: read_stdin_psarg "$@"
# Depends: GNU bash (version 5.1.16)
# Output: stdout (newline delimited)
# Example: read_stdin_psarg "$@"
# Depends: GNU bash (version 5.1.16)
+ # Version: 0.0.1
local input_stdin input_psarg output;
# Store stdin
local input_stdin input_psarg output;
# Store stdin
@@
-42,7
+44,6
@@
read_stdin_psarg() {
# Print to stdout
printf "%s\n" "${output[@]}";
}; # read stdin and positional argument to stdout lines
# Print to stdout
printf "%s\n" "${output[@]}";
}; # read stdin and positional argument to stdout lines
-
main() {
read_stdin_psarg "$@";
};
main() {
read_stdin_psarg "$@";
};