inflight-status

Inflight Internet Stauts Helper Scripts
git clone git://r-36.net/inflight-status
Log | Files | Refs | README | LICENSE

inflight-flight (405B)


      1 #!/bin/sh
      2 
      3 if [ $# -lt 1 ];
      4 then
      5 	printf "usage: %s flight\n" "$(basename "$0")" 2>&1
      6 	exit 1
      7 fi
      8 flight="$1"
      9 
     10 if [ -d "$HOME/rtmp" ];
     11 then
     12 	cd $HOME/rtmp
     13 	dir="$HOME/rtmp"
     14 else
     15 	if [ -d "$HOME/tmp" ];
     16 	then
     17 		cd "$HOME/tmp"
     18 		dir="$HOME/tmp"
     19 	else
     20 		cd /tmp
     21 		dir="/tmp"
     22 	fi
     23 fi
     24 filen="inflight-${flight}-$(date +%Y-%m-%d:%H:%M:%S).txt"
     25 inflight-status | tee "$filen"
     26 printf "%s/%s\n" "${dir}" "${filen}"
     27