Good morning,
I would like to use the contents of a pipe as text for
--text= in a yad-paned.
It's probably quite simple, but I've just got a block.
I would be very happy about a little food for thought.
Wish everyone a nice day.
Greating Wolfgang
My code:
#! /bin/bash
export ausgabe_cmd='@bash -c "ausgabe"'
export meika=$(mktemp -u --tmpdir chmod.XXXXXXXX)
mkfifo $meika
trap "rm -f $meika" EXIT
fkey=$(($RANDOM * $$))
function ausgabe
{
befehl="echo Hallo Welt"
bash -c "$befehl" >"$meika"
}
export -f ausgabe
exec 8<> $meika
yad --plug="$fkey" \
--tabnum=1 \
--form \
--field="Ausgabe:fbtn" "$ausgabe_cmd" &
yad --plug="$fkey" \
--tabnum=2 \
--text="Ausgabe="$@ <&8 "$meika" & #<<< My Problem, i like to set --text= with contents from pipe $meika
yad --key="$fkey" \
--paned \
--button="yad-close:1" --orient=Horizotal \
--splitter=100 \
--width=300\
--height=60
return="$?"
case "$return" in
1|252)
unset ausgabe_cmd ausgabe
exec 8>&-
exit 0
;;
esac