better like that

This commit is contained in:
fred 2022-12-28 23:11:16 +01:00
parent 15b7378d5d
commit c7a83d6c07
6 changed files with 139 additions and 133 deletions

View File

@ -528,22 +528,33 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
# PAY : /?player=PLAYER&pay=1&dest=G1PUB
##############################################
if [[ $APPNAME == "pay" ]]; then
echo "$HTTPCORS" > ~/.zen/tmp/$PLAYER.pay.$VAL.http
echo "$HTTPCORS" > ~/.zen/tmp/$PLAYER.pay.$WHAT.http
if [[ $VAL =~ [0-9] ]]; then
if [[ $WHAT =~ ^[0-9]+$ ]]; then
echo "${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m"
${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m 2>&1 >> ~/.zen/tmp/$PLAYER.pay.$VAL.http
elif [[ $VAL == "balance" || $VAL == "history" || $VAL == "get" ]]; then
echo "${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey $VAL"
${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey $VAL 2>&1 >> ~/.zen/tmp/$PLAYER.pay.$VAL.http
${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m 2>&1 >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
fi
cat ~/.zen/tmp/$PLAYER.pay.$VAL.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
if [[ "$WHAT" == "history" ]]; then
sed -i "s~text/html~application/json~g" ~/.zen/tmp/$PLAYER.pay.$WHAT.http
${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey history -j >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
fi
if [[ "$WHAT" == "get" ]]; then
sed -i "s~text/html~application/json~g" ~/.zen/tmp/$PLAYER.pay.$WHAT.http
${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey get >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
fi
if [[ "$WHAT" == "balance" ]]; then
${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey balance >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
fi
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
end=`date +%s`
echo "(G_G ) PAYING Execution time was "`expr $end - $start` seconds.
echo "(G_G ) G1BANK Operation time was "`expr $end - $start` seconds.
continue
fi

View File

@ -230,7 +230,7 @@ else
# TIDDLER WAS IN CACHE
###################################################################
## TODO : ADD EMAIL TO TAG ( TIMESTAMP & ADD SIGNATURE over existing ones)
cp "${TIDDLER}" "$HOME/.zen/game/$PLAYER/G1CopierYoutube/"
cp "${TIDDLER}" "$HOME/.zen/game/players/$PLAYER/G1CopierYoutube/"
fi
@ -253,8 +253,8 @@ fi
if [[ -s ~/.zen/tmp/$IPFSNODEID/newindex.html ]]; then
## COPY JSON TIDDLER TO PLAYER
cp "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json" "$HOME/.zen/game/$PLAYER/G1CopierYoutube/"
ln -s "$HOME/.zen/game/$PLAYER/G1CopierYoutube/$YID.TW.json" "$HOME/.zen/game/$PLAYER/G1CopierYoutube/$ZFILE.json"
cp "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json" "$HOME/.zen/game/players/$PLAYER/G1CopierYoutube/"
ln -s "$HOME/.zen/game/players/$PLAYER/G1CopierYoutube/$YID.TW.json" "$HOME/.zen/game/players/$PLAYER/G1CopierYoutube/$ZFILE.json"
[[ $(diff ~/.zen/tmp/$IPFSNODEID/newindex.html ${INDEX} ) ]] && cp ~/.zen/tmp/$IPFSNODEID/newindex.html ${INDEX} && echo "===> Mise à jour ${INDEX}"
else
echo "Problem with tiddlywiki command. Missing ~/.zen/tmp/$IPFSNODEID/newindex.html"

View File

@ -116,7 +116,7 @@ isLAN=$(route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.1
##############################################################
## RUN ASTROBOT G1Voeux SUBPROCESS (SPECIFIC Ŋ1 COPY)
##############################################################
${MY_PATH}/VOEUX.refresh.sh ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html "$PLAYER"
${MY_PATH}/VOEUX.refresh.sh "$PLAYER"
##############################################################
##################################

View File

@ -10,11 +10,7 @@ ME="${0##*/}"
################################################################################
# Inspect game wishes, refresh latest IPNS version
# SubProcess Backup and chain
INDEX="$1"
[[ ! $INDEX ]] && echo "Please provide path to source TW index.html - EXIT -" && exit 1
[[ ! -f $INDEX ]] && echo "Fichier TW absent. $INDEX - EXIT -" && exit 1
PLAYER="$2" ## IPNS KEY NAME - G1PUB - PLAYER ...
PLAYER="$1" ## IPNS KEY NAME - G1PUB - PLAYER ...
[[ ! $PLAYER ]] && echo "Please provide IPFS publish key" && exit 1
PSEUDO=$(cat ~/.zen/game/players/$PLAYER/.pseudo 2>/dev/null)
@ -30,9 +26,8 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
# IPFSNODEID=$(ipfs id -f='<id>\n')
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
isLAN=$(route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
[[ ! $INDEX ]] && INDEX="$HOME/.zen/game/players/$PLAYER/ipfs/moa/index.html"
[[ ! -s $INDEX ]] && echo "TW $PLAYER manquant" && exit 1
mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu

View File

@ -35,7 +35,7 @@ alias espeak='espeak 1>&2>/dev/null'
[[ $(which ffmpeg) == "" ]] && echo "ERREUR! Installez ffmpeg" && echo "sudo apt install ffmpeg" && exit 1
[[ $(which xdpyinfo) == "" ]] && echo "ERREUR! Installez x11-utils" && echo "sudo apt install x11-utils" && exit 1
exec 2>&1 >> ~/.zen/tmp/ajouter_media.log
# exec 2>&1 >> ~/.zen/tmp/ajouter_media.log
URL="$1"
PLAYER="$2"
@ -48,7 +48,7 @@ CHOICE="$3"
&& players=($(ls ~/.zen/game/players 2>/dev/null)) \
&& espeak "PLEASE CONNECT A PLAYER" \
&& OUTPUT=$(zenity --entry --width 640 --title="=> Astroport" --text="ASTRONAUTE ?" --entry-text=${players[@]}) \
&& [[ $OUTPUT ]] && PLAYER=$OUTPUT && rm -f ~/.zen/game/players/.current && ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current \
&& [[ $OUTPUT ]] && PLAYER=$OUTPUT && rm -f ~/.zen/game/players/.current && ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current
[[ ${PLAYER} == "" ]] \
&& ${MY_PATH}/start.sh \

View File

@ -1,193 +1,193 @@
#shellcheck shell=sh disable=SC2034
isLan() {
isLan=$(ip route |awk '$1 == "default" {print $3}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" \
|| route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" \
|| true)
[ -n "$isLan" ] && echo "$isLan" || true
isLan=$(ip route |awk '$1 == "default" {print $3}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" \
|| route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" \
|| true)
[ -n "$isLan" ] && echo "$isLan" || true
} 2>/dev/null
isPlayerLegal() {
isPlayerLegal=$(cat "$(myPlayerPath)"/.legal 2>/dev/null || true)
[ -n "$isPlayerLegal" ] && echo "$isPlayerLegal" || true
isPlayerLegal=$(cat "$(myPlayerPath)"/.legal 2>/dev/null || true)
[ -n "$isPlayerLegal" ] && echo "$isPlayerLegal" || true
}
myAstronauteKey() {
myAstronauteKey=$(ipfs --api "$(myIpfsApi)" key list -l | awk '$2 == "'"$(myPlayer)"'" {print $1}')
[ -n "$myAstronauteKey" ] && echo "$myAstronauteKey"
myAstronauteKey=$(ipfs --api "$(myIpfsApi)" key list -l | awk '$2 == "'"$(myPlayer)"'" {print $1}')
[ -n "$myAstronauteKey" ] && echo "$myAstronauteKey"
}
myDomainName() {
myDomainName=$(hostname -d 2>/dev/null) && [ -z "$myDomainName" ] && myDomainName=$(domainname 2>/dev/null) && [ "$myDomainName" = "(none)" ] && myDomainName="localhost"
[ -n "$myDomainName" ] && echo "$myDomainName"
myDomainName=$(hostname -d 2>/dev/null) && [ -z "$myDomainName" ] && myDomainName=$(domainname 2>/dev/null) && [ "$myDomainName" = "(none)" ] && myDomainName="localhost"
[ -n "$myDomainName" ] && echo "$myDomainName"
}
myIpfsHash() {
[ -f "$(myPath)"/localhost/latest ] \
&& myIpfsHash=$(cat "$(myPath)"/localhost/latest) \
|| myIpfsHash=$(myTmpl |ipfs add -q)
[ ! -f "$(myPath)"/localhost/latest ] \
&& echo "$myIpfsHash" > "$(myPath)"/localhost/latest
[ -n "$myIpfsHash" ] && echo "$myIpfsHash"
[ -f "$(myPath)"/localhost/latest ] \
&& myIpfsHash=$(cat "$(myPath)"/localhost/latest) \
|| myIpfsHash=$(myTmpl |ipfs add -q)
[ ! -f "$(myPath)"/localhost/latest ] \
&& echo "$myIpfsHash" > "$(myPath)"/localhost/latest
[ -n "$myIpfsHash" ] && echo "$myIpfsHash"
}
myHttp() {
[ -n "$(myHttpHeader)" ] \
&& myHttp="$(myHttpHeader)
[ -n "$(myHttpHeader)" ] \
&& myHttp="$(myHttpHeader)
" || myHttp=""
[ -n "$(myHttpContent)" ] \
&& myHttp="${myHttp}$(myHttpContent)"
[ -n "$myHttp" ] \
&& echo "$myHttp"
[ -n "$(myHttpContent)" ] \
&& myHttp="${myHttp}$(myHttpContent)"
[ -n "$myHttp" ] \
&& echo "$myHttp"
}
myHttpContent() {
[ -n "$(myIpfsHash)" ] \
&& myHttpContent="<html><head><title>302 Found</title></head><body><h1>Found</h1>
[ -n "$(myIpfsHash)" ] \
&& myHttpContent="<html><head><title>302 Found</title></head><body><h1>Found</h1>
<p>The document is <a href=\"ipfs/$(myIpfsHash)\">here</a> in IPFS.</p></body></html>" \
&& echo "$myHttpContent"
&& echo "$myHttpContent"
}
myHttpHeader() {
[ -n "$(myIpfsHash)" ] \
&& myHttpHeader="HTTP/1.0 302 Found
[ -n "$(myIpfsHash)" ] \
&& myHttpHeader="HTTP/1.0 302 Found
Content-Type: text/html; charset=UTF-8
Content-Length: $(myHttpContent |wc -c)
Date: $(date -R)
Location: ipfs/$(myIpfsHash)
Server: and"
[ -n "$(myIpfsKey)" ] && myHttpHeader="${myHttpHeader}
[ -n "$(myIpfsKey)" ] && myHttpHeader="${myHttpHeader}
set-cookie: AND=$(myIpfsKey); expires=$(date -R -d "+1 month"); path=/; domain=.$(myDomainName); Secure; SameSite=lax"
[ -n "$myHttpHeader" ] && echo "$myHttpHeader"
[ -n "$myHttpHeader" ] && echo "$myHttpHeader"
}
myHome() {
myHome=$(cd ~ && pwd -P)
[ -n "$myHome" ] && echo "$myHome"
myHome=$(cd ~ && pwd -P)
[ -n "$myHome" ] && echo "$myHome"
}
myHostName() {
myHostName=$(hostname |sed 's/\.'"$(myDomainName)"'$//')
[ -n "$(myDomainName)" ] && myHostName="${myHostName}.$(myDomainName)" || myDomainName=${myHostName#*.}
[ -n "$myHostName" ] && echo "$myHostName"
myHostName=$(hostname |sed 's/\.'"$(myDomainName)"'$//')
[ -n "$(myDomainName)" ] && myHostName="${myHostName}.$(myDomainName)" || myDomainName=${myHostName#*.}
[ -n "$myHostName" ] && echo "$myHostName"
}
myIp() {
myIp=$(hostname -I | awk '{print $1}' | head -n 1)
[ -n "$myIp" ] && echo "$myIp"
myIp=$(hostname -I | awk '{print $1}' | head -n 1)
[ -n "$myIp" ] && echo "$myIp"
}
myIpfs() {
[ -n "$(myIpfsHash)" ] \
&& myIpfs="${myIPFS}/ipfs/$(myIpfsHash)" \
&& echo "$myIpfs"
[ -n "$(myIpfsHash)" ] \
&& myIpfs="${myIPFS}/ipfs/$(myIpfsHash)" \
&& echo "$myIpfs"
}
myIpfsApi() {
ipfs --api "$(cat "$(myHome)"/.ipfs/api)" swarm peers >/dev/null 2>&1 \
&& myIpfsApi=$(cat "$(myHome)"/.ipfs/api) \
&& echo "$myIpfsApi"
ipfs --api "$(cat "$(myHome)"/.ipfs/api)" swarm peers >/dev/null 2>&1 \
&& myIpfsApi=$(cat "$(myHome)"/.ipfs/api) \
&& echo "$myIpfsApi"
}
myIpfsKey() {
myIpfsKey=$(ipfs --api "$(myIpfsApi)" key list -l | awk '$2 == "self" {print $1}')
[ -n "$myIpfsKey" ] && echo "$myIpfsKey"
myIpfsKey=$(ipfs --api "$(myIpfsApi)" key list -l | awk '$2 == "self" {print $1}')
[ -n "$myIpfsKey" ] && echo "$myIpfsKey"
}
myIpfsKeystore() {
myIpfsKeystore=$(cd "$(myHome)"/.ipfs/keystore && pwd -P)
[ -n "$myIpfsKeystore" ] && echo "$myIpfsKeystore"
myIpfsKeystore=$(cd "$(myHome)"/.ipfs/keystore && pwd -P)
[ -n "$myIpfsKeystore" ] && echo "$myIpfsKeystore"
}
myIpfsPeerId() {
myIpfsPeerId=$(jq -r .Identity.PeerID "$(myHome)"/.ipfs/config)
[ -n "$myIpfsPeerId" ] && echo "$myIpfsPeerId"
myIpfsPeerId=$(jq -r .Identity.PeerID "$(myHome)"/.ipfs/config)
[ -n "$myIpfsPeerId" ] && echo "$myIpfsPeerId"
}
myIpns() {
[ -n "$(myIpfsKey)" ] \
&& myIpns="${myIPFS}/ipns/$(myIpfsKey)" \
&& echo "$myIpns"
[ -n "$(myIpfsKey)" ] \
&& myIpns="${myIPFS}/ipns/$(myIpfsKey)" \
&& echo "$myIpns"
}
myPath() {
myPath=$(cd ~/.zen/game/players/ && pwd -P)
[ -n "$myPath" ] && echo "$myPath"
myPath=$(cd ~/.zen/game/players/ && pwd -P)
[ -n "$myPath" ] && echo "$myPath"
}
myPlayer() {
myPlayer=$(cat "$(myPath)"/.current/.player 2>/dev/null)
[ -n "$myPlayer" ] && echo "$myPlayer"
}
myPlayerApi() {
ipfs --api "$(cat "$(myPlayerPath)"/.ipfs/api )" swarm peers >/dev/null 2>&1 \
&& myPlayerApi=$(cat "$(myPlayerPath)"/.ipfs/api) \
&& echo "$myPlayerApi"
}
myPlayerBrowser() {
myPlayerBrowser=$(xdg-settings get default-web-browser | cut -d '.' -f 1 | cut -d '-' -f 1)
[ -n "$myPlayerBrowser" ] && echo "$myPlayerBrowser"
}
myPlayerFeedKey() {
myPlayerFeedKey=$(ipfs --api "$(myPlayerApi)" key list -l | awk '$2 == "'"$(myPlayer)"'_feed" {print $1}')
[ -n "$myPlayerFeedKey" ] && echo "$myPlayerFeedKey"
}
myPlayerG1Pub() {
myPlayerG1Pub=$(cat "$(myPlayerPath)"/.g1pub 2>/dev/null)
[ -n "$myPlayerG1Pub" ] && echo "$myPlayerG1Pub"
}
myPlayerKey() {
myPlayerKey=$(ipfs --api "$(myPlayerApi)" key list -l | awk '$2 == "'"$(myPlayer)"'" {print $1}')
[ -n "$myPlayerKey" ] && echo "$myPlayerKey"
}
myPlayerKeystore() {
myPlayerKeystore=$(cd "$(myPlayerPath)"/.ipfs/keystore && pwd -P)
[ -n "$myPlayerKeystore" ] && echo "$myPlayerKeystore"
}
myPlayerNs() {
myPlayerNs=$(cat "$(myPlayerPath)"/.playerns 2>/dev/null)
[ -n "$myPlayerNs" ] && echo "$myPlayerNs"
myPlayer=$(cat "$(myPath)"/.current/.player 2>/dev/null)
[ -n "$myPlayer" ] && echo "$myPlayer"
}
myPlayerPath() {
[ -n "$myPlayer" ] \
&& myPlayerPath=$(cd "$(myPath)"/"$(myPlayer)" && pwd -P) \
&& echo "$myPlayerPath"
[ -n "$myPlayer" ] \
&& myPlayerPath=$(cd "$(myPath)"/"$(myPlayer)" && pwd -P)
echo "$myPlayerPath"
}
myPlayerApi() {
ipfs --api "$(cat "$(myPlayerPath)"/.ipfs/api )" swarm peers >/dev/null 2>&1 \
&& myPlayerApi=$(cat "$(myPlayerPath)"/.ipfs/api) \
&& echo "$myPlayerApi"
}
myPlayerBrowser() {
myPlayerBrowser=$(xdg-settings get default-web-browser | cut -d '.' -f 1 | cut -d '-' -f 1)
[ -n "$myPlayerBrowser" ] && echo "$myPlayerBrowser"
}
myPlayerFeedKey() {
myPlayerFeedKey=$(ipfs --api "$(myPlayerApi)" key list -l | awk '$2 == "'"$(myPlayer)"'_feed" {print $1}')
[ -n "$myPlayerFeedKey" ] && echo "$myPlayerFeedKey"
}
myPlayerG1Pub() {
myPlayerG1Pub=$(cat "$(myPlayerPath)"/.g1pub 2>/dev/null)
[ -n "$myPlayerG1Pub" ] && echo "$myPlayerG1Pub"
}
myPlayerKey() {
myPlayerKey=$(ipfs --api "$(myPlayerApi)" key list -l | awk '$2 == "'"$(myPlayer)"'" {print $1}')
[ -n "$myPlayerKey" ] && echo "$myPlayerKey"
}
myPlayerKeystore() {
myPlayerKeystore=$(cd "$(myPlayerPath)"/.ipfs/keystore && pwd -P)
[ -n "$myPlayerKeystore" ] && echo "$myPlayerKeystore"
}
myPlayerNs() {
myPlayerNs=$(cat "$(myPlayerPath)"/.playerns 2>/dev/null)
[ -n "$myPlayerNs" ] && echo "$myPlayerNs"
}
myPlayerPseudo() {
myPlayerPseudo=$(cat "$(myPlayerPath)"/.pseudo 2>/dev/null)
[ -n "$myPlayerPseudo" ] && echo "$myPseudo"
myPlayerPseudo=$(cat "$(myPlayerPath)"/.pseudo 2>/dev/null)
[ -n "$myPlayerPseudo" ] && echo "$myPseudo"
}
myTmpl() {
myTmpl=$($RUN sed \
-e "s~\"http://127.0.0.1:1234/\"~\"${myIPFS}/\"~g" \
-e "s~\"http://127.0.0.1:1234\"~\"${myASTROPORT}\"~g" \
-e "s~http://127.0.0.1:8080~${myIPFS}~g" \
-e "s~http://127.0.0.1:12345~http://${myHOST}:12345~g" \
-e "s~_IPFSNODEID_~${IPFSNODEID}~g" \
-e "s~_HOSTNAME_~$(hostname)~g" \
-e "s~.000.~.$(printf '%03d' "$(seq 0 17 |shuf -n 1)").~g" \
myTmpl=$($RUN sed \
-e "s~\"http://127.0.0.1:1234/\"~\"${myIPFS}/\"~g" \
-e "s~\"http://127.0.0.1:1234\"~\"${myASTROPORT}\"~g" \
-e "s~http://127.0.0.1:8080~${myIPFS}~g" \
-e "s~http://127.0.0.1:12345~http://${myHOST}:12345~g" \
-e "s~_IPFSNODEID_~${IPFSNODEID}~g" \
-e "s~_HOSTNAME_~$(hostname)~g" \
-e "s~.000.~.$(printf '%03d' "$(seq 0 17 |shuf -n 1)").~g" \
~/.zen/Astroport.ONE/templates/register.html)
[ -n "$isLAN" ] \
&& myTmpl=$($RUN echo "$myTmpl" | sed \
[ -n "$isLAN" ] \
&& myTmpl=$($RUN echo "$myTmpl" | sed \
-e "s~<input type='"'hidden'"' name='"'salt'"' value='"'0'"'>~<input name='"'salt'"' value='"''"'>~g" \
-e "s~<input type='"'hidden'"' name='"'pepper'"' value='"'0'"'>~<input name='"'pepper'"' value='"''"'>~g")
[ -n "$myTmpl" ] && echo "$myTmpl"
[ -n "$myTmpl" ] && echo "$myTmpl"
}
myTs() {
myTs=$(date -u +"%Y%m%d%H%M%S%4N")
[ -n "$myTs" ] && echo "$myTs"
myTs=$(date -u +"%Y%m%d%H%M%S%4N")
[ -n "$myTs" ] && echo "$myTs"
}
MOATS="$(myTs)"