im trying to make script to get pppoe user name for an example "user1"@net to system identity automaticly so i want the part before @ to be taken is this possible to make ?
:local rescontent
:interface pppoe-client print file=ppoeusr.txt
:local fileContents [/file get [/file find name=ppoeusr.txt] contents];
:local variableName "user";
:local start [:find ($variableName . "=") $fileContents];
:set start ($start + [:len $variableName] + 1);
:local end [:find $fileContents " " $start];
:local value [:pick $fileContents $start $end];
:put ("The value of '$variableName' is: " . $value);
:system identity set name=$value
i tried this but than id doesnt get correct values