Commit 079240db authored by Roman Haefeli's avatar Roman Haefeli
Browse files

command: abstraction and bash script to add proper command control to [shell]

parent 723fe8f1
#N canvas 463 43 468 434 10;
#X declare -stdpath ggee;
#X obj 25 42 inlet;
#X obj 253 47 inlet;
#X obj 76 301 outlet;
#X text 119 302 STDOUT;
#X obj 262 353 outlet;
#X text 305 354 EXECSTATUS;
#X text 73 44 COMMAND;
#X text 299 47 SIGHUP;
#X obj 14 9 declare -stdpath ggee;
#X obj 25 193 shell;
#X obj 25 150 list trim;
#X obj 52 344 s \$0.pid;
#X obj 25 318 t b a;
#X msg 25 366 1;
#X obj 25 395 s \$0.state;
#X obj 52 214 sel 0;
#X msg 52 234 0;
#X obj 52 253 s \$0.state;
#X obj 253 68 b;
#X obj 253 217 shell;
#X obj 268 149 r \$0.pid;
#X obj 253 171 f;
#X msg 253 195 kill \$1;
#X obj 262 323 r \$0.state;
#X obj 25 103 spigot 1;
#X obj 100 84 r \$0.state;
#X obj 100 104 ==;
#X obj 298 92 r \$0.state;
#X obj 253 114 spigot 0;
#X obj 25 130 list prepend include/command.sh;
#X obj 25 278 route PID;
#X connect 0 0 24 0;
#X connect 1 0 18 0;
#X connect 9 0 30 0;
#X connect 9 1 15 0;
#X connect 10 0 9 0;
#X connect 12 0 13 0;
#X connect 12 1 11 0;
#X connect 13 0 14 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 18 0 28 0;
#X connect 20 0 21 1;
#X connect 21 0 22 0;
#X connect 22 0 19 0;
#X connect 23 0 4 0;
#X connect 24 0 29 0;
#X connect 25 0 26 0;
#X connect 26 0 24 1;
#X connect 27 0 28 1;
#X connect 28 0 21 0;
#X connect 29 0 10 0;
#X connect 30 0 12 0;
#X connect 30 1 2 0;
#!/bin/bash
while read line
do
echo "$line"
done < <($@ 2>&1 & echo "PID $!")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment