On my VDSL Moden that runs Busybox I got only ash shell.
My goal is to put into multiple variables the output of the command /bin/dsl-tool iadtool
Output of the command is:
DSLAPI-Version=dsl-api-1.12.0
IADToolAPI-Version=0.0.1
LineState=Showtime
TransmissionSystem=G993.2 Region B Annex B
xDslMode=VDSL2
ActualDataRateUS=43992000
ActualDataRateDS=276368000
FirmwareVersion=8.13.1.12.1.7
At the end I need the values from ActualDataRateUS and ActualDataRateDS. My first Testscript looks like:
#!/bin/ash
#/bin/dsl-tool iadtool
input=$(/bin/dsl-tool iadtool | grep ActualDataRateUS)
echo $input
which sets the value input to ActualDataRateUS=43992000, but I only need the Value. I'm used to script in python. Is my goal even doable in bash?
This should work: