Lets assume that Vaisala weather station is connected via RS232 to USB serial dongle in /dev/ttyUSB0:
cat /dev/ttyUSB0 | maws2jsonLets assume thatVaisal weather station can be reached from IP address 10.10.10.10 in a port 5000:
netcat 10.10.10.10 5000 | maws2jsonLets assume that you have a file called "maws.dat" that contains MAWS datalines:
maws2json --file maws.datLets assume that you are reading again from serial port in real time:
cat /dev/ttyUSB0 | maws2json | sed 's/\"/\\\"/g' | xargs -I % gcloud pubsub topics publish projects/my-gcp-project-id/topics/maws --message='%'