Bash with json

From test.coolscript.org
Revision as of 17:26, 2 July 2022 by Admin (talk | contribs) (Created page with " *get local ssh ip *Curl jsdon data jdata=`curl -s --connect-timeout 3 --max-time 3 https://api.coolgeo.org?ip=$ip` >/dev/null *Copy to radnom filename mkrnd=`cat /proc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • get local ssh ip


  • Curl jsdon data
jdata=`curl -s  --connect-timeout 3  --max-time 3 https://api.coolgeo.org?ip=$ip` >/dev/null
  • Copy to radnom filename
mkrnd=`cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20; echo;`
statfile="/tmp/$mkrnd-ssh-logon.json"
echo $jdata > $statfile