daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. function jsonval {
  4.     temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
  5.     echo ${temp##*|}
  6. }
  7.  
  8. #posle GET zamenuvas so tvojot link
  9. json=`curl -s -X GET http://194.33.12.24/timetables/liveBusArrival?station_int_id=1934`
  10. #koj parametar go baras go stavas tuka, primer ovde go baram "route_name"
  11. prop='route_name'
  12. #tuka dobivas vrednosta na parametarot
  13. res_value=`jsonval`
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top