#!/bin/bash while true do read LINE || break NUM=$(echo $LINE | awk '{print $1}') INPUT=$(echo $LINE | awk '{print $4 ":" $5 " " $6 ":" $7}') OUTPUT=$(skycoor -dj $INPUT | awk '{print $1 " " $2}') echo $NUM $OUTPUT done