print output in one line

Hi

is it possible to force print command to print output in one line ??

Im doing something like this
ssh -i key -l user host_ip “/int wire reg print”

and I get output with new line chars

 0 ;;; XXX
   interface=sektor_2 mac-address=00:4F:62:0C:87:BE ap=no wds=no
   rx-rate=11Mbps tx-rate=11Mbps packets=4318194,3967228
   bytes=4161506541,1112106601 frames=4318194,3967228
   frame-bytes=4135634097,1088303233 hw-frames=4318191,3967228
   hw-frame-bytes=4239270369,1183516705 uptime=4d1h25m2s last-activity=60ms
   signal-strength=-65dBm@11Mbps signal-to-noise=38dB
   strength-at-rates=-67dBm@1Mbps 2d16h42m33s70ms,-67dBm@2Mbps
                     2d18h57m53s840ms,-67dBm@5.5Mbps 2d16h42m22s90ms,-
                     65dBm@11Mbps 60ms
   tx-ccq=100% p-throughput=8208 ack-timeout=30 distance=30 framing-mode=none
   last-ip=192.168.4.15 802.1x-port-enabled=yes authentication-type=none
   encryption=none

I want to output look like this (so I can easily use awk) ONE LINE

 0 ;;; XXX interface=sektor_2 mac-address=00:4F:62:0C:87:BE ap=no wds=no rx-rate=11Mbps tx-rate=11Mbps packets=4318194,3967228 bytes=4161506541,1112106601 frames=4318194,3967228 frame-bytes=4135634097,1088303233 hw-frames=4318191,3967228 hw-frame-bytes=4239270369,1183516705 uptime=4d1h25m2s last-activity=60ms signal-strength=-65dBm@11Mbps signal-to-noise=38dB strength-at-rates=-67dBm@1Mbps 2d16h42m33s70ms,-67dBm@2Mbps d18h57m53s840ms,-67dBm@5.5Mbps 2d16h42m22s90ms,-65dBm@11Mbps 60ms tx-ccq=100% p-throughput=8208 ack-timeout=30 distance=30 framing-mode=none last-ip=192.168.4.15  802.1x-port-enabled=yes authentication-type=none encryption=none

as far as i know it’s not possible. Anyway, why would you need that?

i want to crete script that process text file with output of /int wire reg print and which return some values which i can’t get via snmp about user connection … then i want to graph it with cacti

See value-list/terse/detail parameters of the print command…
Or you can use a script to return only the values you need:

:put [/int wireless get 0 mtu]

or (to list info for all present wireless interfaces)

:foreach i in=[/interface wireless find] do={:put (“Interface:” . [/interface wireless get $i name]);:put (“Frequency:” . [/interface wireless get $i frequency])}

:slight_smile: BIG 10x !!!

Thanks Dada

I’ve been searching a few hours for that command!

G