[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dunno why unexpected token ';'
From: |
ikhxcsz7y xmbott |
Subject: |
dunno why unexpected token ';' |
Date: |
Sat, 14 Nov 2020 07:42:37 +0100 |
( http://ix.io/2E6y )
++ BEGINFILE ii.x7yz.1
i code shortened coding codings, or at least wish to
here in my x7yz control script i '. -- +al' a ./+al file which then
sets aliases by file content, it does so
but the resulting +al alias of itself says when usage syntax error ';'
unexpected
some other aliases work tho
any ideas ?
-- ENDFILE ii.x7yz.1 -=| 285 chars 55 words 6 lines
++ BEGINFILE oo.x7yz.4
root@boost:~/x7yz# . x7yz
root@boost:~/x7yz# type +al
+al is aliased to `aalres=( ) aalt=
for caali in "${!aal[@]}" ; do
aalres[caali]=$(
printf %s "${aal[caali]}="
if [[ -f ${aalt:=${aald[caali]:-${aal[caali]}}} ]] ; then
exec cat -- "$aalt"
else
printf -- %s "$aalt"
fi
) aalt=
done
[[ -v aalres[0] ]] &&
alias -- "${aalres[@]}" ; '
root@boost:~/x7yz# +al
bash: syntax error near unexpected token `;'
root@boost:~/x7yz#
-- ENDFILE oo.x7yz.4 -=| 439 chars 63 words 18 lines
++ BEGINFILE x7yz
#!/bin/bash
self=${BASH_SOURCE##/*} self=${self+$PWD/$self} self=${self:-$BASH_SOURCE} \
dir=${self%/*} ; cd "$dir"
shopt -s extglob globstar expand_aliases
aal=( +al KWS +kw kwp )
. -- "$aal"
KWS
-- ENDFILE x7yz -=| 198 chars 24 words 8 lines
++ BEGINFILE +al
aalres=( ) aalt=
for caali in "${!aal[@]}" ; do
aalres[caali]=$(
printf %s "${aal[caali]}="
if [[ -f ${aalt:=${aald[caali]:-${aal[caali]}}} ]] ; then
exec cat -- "$aalt"
else
printf -- %s "$aalt"
fi
) aalt=
done
[[ -v aalres[0] ]] &&
alias -- "${aalres[@]}" ;
-- ENDFILE +al -=| 278 chars 42 words 13 lines
-- END of 4 pastes ( 1200 chars 184 words 45 lines
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- dunno why unexpected token ';',
ikhxcsz7y xmbott <=