Advertisement
Guest User

freport.sh

a guest
Apr 19th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. T_NOW=$(date -d now "+%s")
  4.  
  5. T_START=$(date -d last-month +"%s")
  6. T1=$(lncli fwdinghistory --start_time=$T_START --end_time=$T_NOW | grep "last_offset_index")
  7. T_START=$(date -d last-week +"%s")
  8. T2=$(lncli fwdinghistory --start_time=$T_START --end_time=$T_NOW | grep "last_offset_index")
  9. T_START=$(date -d yesterday +"%s")
  10. T3=$(lncli fwdinghistory --start_time=$T_START --end_time=$T_NOW | grep "last_offset_index")
  11.  
  12. echo "Payments Routed"
  13. echo "Month: "$T1
  14. echo "Week : "$T2
  15. echo "Today: "$T3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement