help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simpler question about my script


From: Alex fxmbsw7 Ratchev
Subject: simpler question about my script
Date: Tue, 15 Feb 2022 20:30:07 +0100

the following is a set -x of this script, the starting part
one question, why doesnt ssh start, or time out
there is no ssh in ps aux it just hangs
question is, did ssh get started or why not..

bash -x run start
+ shopt -s expand_aliases
+ name=main
+ sshstart='y=~/$y
touch /tmp/foo
[[ -d $y ]] || mkdir -p "$y"
cd "$y" || exec printf \'\''err cd transit\n\'\''
[[ -p in || -p out ]] && rm -f {in,out}
mkfifo {in,out}
while cat in ; do sleep .15 || exit 1 ; done &
while cat >>out ; do sleep .15 || exit 1 ; done'
+ addr=d
+ myapp=backsshbash2
+ alias -- 'mkvars=myd=~/.$myapp z=$myd/$name y=.$myapp/$name \
a=( i i1 i2 o )

[[ -d $z ]] || mkdir -p "$z"

cd "$z" || bye 1 '\''cant cd to safety dir %s\n'\'' "$z"' '2=bash -i <i >>o
2>&1' '1=while read -r -N 2 r ; do
if [[ $r == c* ]] ; then printf %s "${r:1:1}"
else printf %s "${r:1:1}" >&2 ; fi
done <i1 2> >( while read -r -N 1 r ; do
if [[ $r == e ]] ; then kill -0 $( <p )
else kill -9 $( <p ) $( <pp ) ; rm -f "${a[@]}" ; fi
done )' '3=<o >>i1 ssh "$addr" "$( declare -p y ) $sshstart"'
+ [[ run != */* ]]
+ myapp=run
+ supported0=('help' '' 'start' '' 'stop' '' 'connect' '')
+ declare -A supported0
+ supported1=(name '' addr '')
+ ((  1  ))
+ fill=('' "$@")
+ i=
+ [[ -v fill[++i] ]]
+ arg=start
+ [[ -v supported0[$arg] ]]
+ proceed=start
+ [[ -v fill[++i] ]]
+ myd=/root/.run
+ z=/root/.run/main
+ y=.run/main
+ a=(i i1 i2 o)
+ [[ -d /root/.run/main ]]
+ cd /root/.run/main
+ [[ -n start ]]
+ start
+ bash -i
++ declare -p y
+ ssh d 'declare -- y=".run/main" y=~/$y
touch /tmp/foo
[[ -d $y ]] || mkdir -p "$y"
cd "$y" || exec printf \'\''err cd transit\n\'\''
[[ -p in || -p out ]] && rm -f {in,out}
mkfifo {in,out}
while cat in ; do sleep .15 || exit 1 ; done &
while cat >>out ; do sleep .15 || exit 1 ; done'
^C

Attachment: backsshbash2.cat
Description: application/vnd.ms-pki.seccat


reply via email to

[Prev in Thread] Current Thread [Next in Thread]