Output callsigns to variable or CSV file


I am working on a script that will log a timestamps and callsign to a text file. I can't figure out how to get the callsign of the station that is broadcasting. Setting it as a variable for use in bash would be really cool, but at this point I would even be happy with a one liner writing it to a TMP .txt file.

Could anyone suggest how to get the callsign from the command line when the RX begins?

Join main@DVSwitch.groups.io to automatically receive all group messages.