print "Hello, World!";#### CV Creation Confirmation #### $cvinput = readinput(\n\nIs thre pre-cv created ?\n\n\nType created or notcreated \t : ) if $cvinput != created && $cvinput != notcreated l echo Incorrect Input provided. q fi $date = `date +%Y%m%d_%H%M%S` l+ $nodename_Anchor_BL_LOG_$date.txt l rm $nodename_Anchor_$NR_Siteid_script.mos l rm $nodename_Anchor_$NR_Siteid_script.xml unset all $NR_Site = readinput(\n\n5G SITEID PLEASE\n\n\n5G SITEID : ) $NR_Siteid = `echo $NR_Site | tr '[:lower:]' '[:upper:]'` unset $NR_Site us+ u- $tempheader = `grep DoNotEditThisLine $undocommandfile` l echo "$tempheader" > $nodename_Anchor_$NR_Siteid_script.mos l echo "" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "gs+" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "crn ENodeBFunction=1,GUtraNetwork=1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "end" >> $nodename_Anchor_$NR_Siteid_script.mos !amosbatch $NR_Siteid 'uv com_usernames=rbs,expert,root;uv com_passwords=Er1css0n#BBU,5Gexpert,StArW@r$1977#;lt all;pr ,NRCellDU=.*_N005._;if $nr_of_mos > 0;l echo NR-LB > $nodename_Anchor_$NR_Siteid_RATS.txt;fi;pr ,NRCellDU=.*_N2..._;if $nr_of_mos > 0;l echo NR-HB > $nodename_Anchor_$NR_Siteid_RATS.txt;fi;pr ,NRCellDU=.*_N077._;if $nr_of_mos > 0;l echo NR-77 > $nodename_Anchor_$NR_Siteid_RATS.txt;fi;pr ,NRCellDU=.*_N002._;if $nr_of_mos > 0;l echo NR-MB > $nodename_Anchor_$NR_Siteid_RATS.txt;fi;pr ,NRCellDU=.*_N066._;if $nr_of_mos > 0;l echo NR-MB > $nodename_Anchor_$NR_Siteid_RATS.txt;fi;get GNBCUCPFunction=1 ^gNBId$ > $gnbid;l echo crn ENodeBFunction=1,GUtraNetwork=1,ExternalGNodeBFunction=310410-000000$gnbid >> $nodename_Anchor_$NR_Siteid_script.mos;l echo gNodeBId $gnbid >> $nodename_Anchor_$NR_Siteid_script.mos;l echo gNodeBIdLength 26 >> $nodename_Anchor_$NR_Siteid_script.mos;l echo gNodeBPlmnId mcc=310,mnc=410,mncLength=3 >> $nodename_Anchor_$NR_Siteid_script.mos;l echo end >> $nodename_Anchor_$NR_Siteid_script.mos;l echo >> $nodename_Anchor_$NR_Siteid_script.mos;l echo crn ENodeBFunction=1,GUtraNetwork=1,ExternalGNodeBFunction=310410-000000$gnbid,TermPointToGNB=310410-000000$gnbid >> $nodename_Anchor_$NR_Siteid_script.mos;l echo administrativeState 1 >> $nodename_Anchor_$NR_Siteid_script.mos;lget InterfaceIPv6=(NR|.*S1),AddressIPv6= ^address$ > $5gaddress;$5gaddress = $5gaddress -s \/.*;l echo ipv6Address $5gaddress >> $nodename_Anchor_$NR_Siteid_script.mos;l echo end >> $nodename_Anchor_$NR_Siteid_script.mos;mr gr_nrcelldu;ma gr_nrcelldu ,NRCellDU;for $mo in gr_nrcelldu;get $mo cellLocalId > $nrcellid;get $mo nRPCI > $nrpci;$nrcellsub = $nrpci % 3;$nrcellgr = $nrpci - $nrcellsub;$nrcellgr = $nrcellgr / 3;get $mo nrtac > $nrtac;get $mo ^ssbFrequency$ > $ssbfreq;get $mo ^ssbOffset$ > $smtcOffset;get $mo ^ssbPeriodicity$ > $smtcPeriodicity;get $mo ^ssbSubCarrierSpacing$ > $smtcScs;get $mo ^ssbDuration$ > $smtcDuration;get $mo nRCellDUId > $nrcellduid;$band = $nrcellduid -s .*_N0*;$band = $band -s ._.$;l echo crn ENodeBFunction=1,GUtraNetwork=1,GUtranSyncSignalFrequency=$ssbfreq-$smtcScs >> $nodename_Anchor_$NR_Siteid_script.mos;l echo arfcn $ssbfreq >> $nodename_Anchor_$NR_Siteid_script.mos;l echo band $band >> $nodename_Anchor_$NR_Siteid_script.mos;l echo smtcScs $smtcScs >> $nodename_Anchor_$NR_Siteid_script.mos;l echo smtcPeriodicity $smtcPeriodicity >> $nodename_Anchor_$NR_Siteid_script.mos;l echo smtcOffset $smtcOffset >> $nodename_Anchor_$NR_Siteid_script.mos;l echo smtcDuration $smtcDuration >> $nodename_Anchor_$NR_Siteid_script.mos;l echo end >> $nodename_Anchor_$NR_Siteid_script.mos;l echo crn ENodeBFunction=1,GUtraNetwork=1,ExternalGNodeBFunction=310410-000000$gnbid,ExternalGUtranCell=310410-000000$gnbid-$nrcellid >> $nodename_Anchor_$NR_Siteid_script.mos;l echo absSubFrameOffset 0 >> $nodename_Anchor_$NR_Siteid_script.mos;l echo absTimeOffset 0 >> $nodename_Anchor_$NR_Siteid_script.mos;l echo gUtranSyncSignalFrequencyRef ENodeBFunction=1,GUtraNetwork=1,GUtranSyncSignalFrequency=$ssbfreq-$smtcScs >> $nodename_Anchor_$NR_Siteid_script.mos;l echo localCellId $nrcellid >> $nodename_Anchor_$NR_Siteid_script.mos;l echo physicalLayerCellIdGroup $nrcellgr >> $nodename_Anchor_$NR_Siteid_script.mos;l echo physicalLayerSubCellId $nrcellsub >> $nodename_Anchor_$NR_Siteid_script.mos;l echo nRTAC $nrtac >> $nodename_Anchor_$NR_Siteid_script.mos;l echo plmnIdList mcc=310,mnc=410,mncLength=3 >> $nodename_Anchor_$NR_Siteid_script.mos;l echo end >> $nodename_Anchor_$NR_Siteid_script.mos;done;l echo $gnbid > $nodename_Anchor_$NR_Siteid_GNBID.txt' $5G_log = readfile($nodename_Anchor_$NR_Siteid_script.mos) if $nr_of_lines = 0 l echo 5G SITE IS NOT REACHABLE return fi $nrnodegnbid = `grep ^. $nodename_Anchor_$NR_Siteid_GNBID.txt` l rm $nodename_Anchor_$NR_Siteid_GNBID.txt get ,ExternalGNodeBFunction= ^gNodeBId$ $nrnodegnbid if $nr_of_mos > 0 mr Extfunc ma Extfunc ,ExternalGNodeBFunction= ^gNodeBId$ $nrnodegnbid get Extfunc externalGNodeBFunctionId > $extfuncid l sed -i 's/,ExternalGNodeBFunction=310410-000000$nrnodegnbid/,ExternalGNodeBFunction=$extfuncid/g' $nodename_Anchor_$NR_Siteid_script.txt mr Extfunc fi mr gr_extnrcell ma gr_extnrcell ,ExternalGUtranCell=310410-000000$nrnodegnbid for $mo in gr_extnrcell $ldn = ldn($mo) l echo "lset $ldn$ plmnIdList mcc=310,mnc=410,mncLength=3;mcc=313,mnc=100,mncLength=3" >> $nodename_Anchor_$NR_Siteid_script.mos done mr gr_extnrcell seti ,ReportConfigB1GUtra=1 reportIntervalB1 2 $gnbtype = `grep ^. $nodename_Anchor_$NR_Siteid_RATS.txt` if $gnbtype = NR-HB l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ dcSCellActDeactDataThres 100" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ dcSCellActDeactDataThresHyst 90" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ dcSCellDeactDelayTimer 50" >> $nodename_Anchor_$NR_Siteid_script.mos mr gr_fdd ma gr_fdd ,EUtranCellFDD= eUtranCellFDDId !(.*_F$|.*_E$) mr gr_fdd1 ma gr_fdd1 gr_fdd dlChannelBandwidth !(^3000$|^5000$) mr gr_fdd mr gr_fdd2 ma gr_fdd2 gr_fdd1 isDlOnly !true mr gr_fdd1 for $mo in gr_fdd2 $ldn = ldn($mo) l echo "lset $ldn,UeMeasControl=1,ReportConfigB1GUtra=1$ b1ThresholdRsrp -110" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn,UeMeasControl=1,ReportConfigA5EndcHo=1$ reportAmountA5 0" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ primaryUpperLayerInd 1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ endcAllowedPlmnList mcc=310,mnc=410,mncLength=3;mcc=313,mnc=100,mncLength=3" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ additionalUpperLayerIndList 1,0,0,0,0" >> $nodename_Anchor_$NR_Siteid_script.mos done mr gr_fdd2 fi if $gnbtype != NR-HB l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ dcSCellActDeactDataThres 30" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ dcSCellActDeactDataThresHyst 30" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ dcSCellDeactDelayTimer 200" >> $nodename_Anchor_$NR_Siteid_script.mos fi if $gnbtype = NR-LB mr gr_fdd ma gr_fdd ,EUtranCellFDD= eUtranCellFDDId !.*_[78]._ mr gr_fdd1 ma gr_fdd1 gr_fdd dlChannelBandwidth !(^3000$|^5000$) mr gr_fdd mr gr_fdd2 ma gr_fdd2 gr_fdd1 isDlOnly !true mr gr_fdd1 for $mo in gr_fdd2 $ldn = ldn($mo) l echo "lset $ldn,UeMeasControl=1,ReportConfigB1GUtra=1$ b1ThresholdRsrp -113" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn,UeMeasControl=1,ReportConfigA5EndcHo=1$ reportAmountA5 8" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ primaryUpperLayerInd 1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ endcAllowedPlmnList mcc=310,mnc=410,mncLength=3;mcc=313,mnc=100,mncLength=3" >> $nodename_Anchor_$NR_Siteid_script.mos done mr gr_fdd2 fi if $gnbtype = NR-MB || $gnbtype = NR-77 mr gr_fdd ma gr_fdd ,EUtranCellFDD= eUtranCellFDDId !(.*_F$|.*_E$) mr gr_fdd1 ma gr_fdd1 gr_fdd dlChannelBandwidth !(^5000$) mr gr_fdd mr gr_fdd2 ma gr_fdd2 gr_fdd1 isDlOnly !true mr gr_fdd1 for $mo in gr_fdd2 $ldn = ldn($mo) l echo "lset $ldn,UeMeasControl=1,ReportConfigB1GUtra=1$ b1ThresholdRsrp -113" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn,UeMeasControl=1,ReportConfigA5EndcHo=1$ reportAmountA5 8" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ primaryUpperLayerInd 1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ endcAllowedPlmnList mcc=310,mnc=410,mncLength=3;mcc=313,mnc=100,mncLength=3" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset $ldn$ additionalUpperLayerIndList 1,0,0,0,0" >> $nodename_Anchor_$NR_Siteid_script.mos done mr gr_fdd2 fi l echo "lset ENodeBFunction=1$ extendedBandN77Supported true" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1$ ueCapabilityEnquirySteps 1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1$ zzzTemporary81 1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset ENodeBFunction=1,CarrierAggregationFunction=1$ endcCaPolicy 1" >> $nodename_Anchor_$NR_Siteid_script.mos l echo "lset SystemFunctions=1,Lm=1,FeatureState=CXC4012218$ featureState 1" >> $nodename_Anchor_$NR_Siteid_script.mos mr gr_GUtranFreqRelation ma gr_GUtranFreqRelation ,GUtranFreqRelation= for $mo in gr_GUtranFreqRelation $ldn = ldn($mo) l echo "lset $ldn$ pMaxNR 23" >> $nodename_Anchor_$NR_Siteid_script.mos done mr gr_GUtranFreqRelation l echo "gs-" >> $nodename_Anchor_$NR_Siteid_script.mos u! $nodename_Anchor_$NR_Siteid_script.mos l sed -i 's/<ManagedElement><managedElementId>1<\/managedElementId>//g;s/<\/ManagedElement><\/ManagedElement>/<\/ManagedElement>/g' $nodename_Anchor_$NR_Siteid_script.xml netconf $nodename_Anchor_$NR_Siteid_script.xml l rm $nodename_Anchor_$NR_Siteid_script.mos l rm $nodename_Anchor_$NR_Siteid_script.xml lt all l echo "$tempheader" > $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "gs+" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos pr NodeBFunction=1,GUtraNetwork=1,GUtranSyncSignalFrequency= if $nr_of_mos > 1 mr gr_fdduli ma gr_fdduli ,EUtranCellFDD= primaryUpperLayerInd 1 for $mo in gr_fdduli $ldn = ldn($mo) l echo "lset $ldn,UeMeasControl=1$ endcMeasTime 2000" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "lset $ldn,UeMeasControl=1$ endcMeasRestartTime 7000" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos done mr gr_fdduli l echo "lset SystemFunctions=1,Lm=1,FeatureState=CXC4012371$ featureState 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos else mr gr_fdduli ma gr_fdduli ,EUtranCellFDD= primaryUpperLayerInd 1 for $mo in gr_fdduli $ldn = ldn($mo) l echo "lset $ldn,UeMeasControl=1$ endcMeasTime -1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "lset $ldn,UeMeasControl=1$ endcMeasRestartTime -1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos done mr gr_fdduli l echo "lset SystemFunctions=1,Lm=1,FeatureState=CXC4012371$ featureState 1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos fi ################################################################################ ####:----------------> EUtranCellFDD ---> GUtranFreqRelation <----------------:#### func ParamGUtranFreqRelationN77 $b1ThrRsrp = -10 $endcb1 = 6 endfunc func ParaGUtranFreqRelationN260 $b1ThrRsrp = 3 $endcb1 = 7 endfunc func ParaGUtranFreqRelationNR2 $b1ThrRsrp = -1 $endcb1 = 2 endfunc func ParaGUtranFreqRelationN5 $b1ThrRsrp = -1 $endcb1 = 5 endfunc func ParaGUtranFreqRelationN66 $b1ThrRsrp = -1 $endcb1 = 3 endfunc func CreateGUtranFreqRelation pr ENodeBFunction=1,EUtranCellFDD=$ecellid,GUtranFreqRelation=$arfcnval-$smtcScs-$smtcPeriodicity-$smtcOffset-$smtcDuration if $nr_of_mos = 0 l echo "crn ENodeBFunction=1,EUtranCellFDD=$ecellid,GUtranFreqRelation=$arfcnval-$smtcScs-$smtcPeriodicity-$smtcOffset-$smtcDuration" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "cellReselectionPriority 7" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "connectedModeMobilityPrio 6" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "endcB1MeasPriority $endcb1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "gUtranSyncSignalFrequencyRef $gref" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "allowedPlmnList mcc=310,mnc=410,mncLength=3;mcc=313,mnc=100,mncLength=3" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "anrMeasOn true" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "deriveSsbIndexFromCell false" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "b1ThrRsrpFreqOffset $b1ThrRsrp" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "b1ThrRsrqFreqOffset 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "pMaxNR 23" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "qOffsetFreq 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "qQualMin -30" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "qRxLevMin -104" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "threshXHigh 4" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "threshXHighQ 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "threshXLow 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "threshXLowQ 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "end" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos fi endfunc func CreateEUtranCellFDDGUtranFreqRelation mr gr_fdduli ma gr_fdduli ,EUtranCellFDD= primaryUpperLayerInd 1 for $MO in gr_fdduli get $MO ^eUtranCellFDDId$ > $ecellid if $bandval ~ ^5$ && $ecellid ~ _F$ $endcb1 = -1 fi CreateGUtranFreqRelation done endfunc lt all mr SyncFreqs ma SyncFreqs ENodeBFunction=1,GUtraNetwork=1,GUtranSyncSignalFrequency= for $sfrqmo in SyncFreqs $gref = ldn($sfrqmo) get $sfrqmo ^arfcn$ > $arfcnval get $sfrqmo ^band$ > $bandval get $sfrqmo smtcScs > $smtcScs get $sfrqmo smtcPeriodicity > $smtcPeriodicity get $sfrqmo smtcOffset > $smtcOffset get $sfrqmo smtcDuration > $smtcDuration if $bandval ~ ^77$ ParamGUtranFreqRelationN77 CreateEUtranCellFDDGUtranFreqRelation else if $bandval ~ ^260$ ParaGUtranFreqRelationN260 CreateEUtranCellFDDGUtranFreqRelation else if $bandval ~ ^2$ ParaGUtranFreqRelationNR2 CreateEUtranCellFDDGUtranFreqRelation else if $bandval ~ ^5$ ParaGUtranFreqRelationN5 CreateEUtranCellFDDGUtranFreqRelation else if $bandval ~ ^66$ ParaGUtranFreqRelationN66 CreateEUtranCellFDDGUtranFreqRelation fi done mr SyncFreqs mr gr_fdduli ################################################################################ ####:----------------> EUtranCellFDD ---> GUtranFreqRelation ---> GUtranCellRelation <----------------:#### func CreateGUtranCellRelation $gutrelmo = ENodeBFunction=1,EUtranCellFDD=$ecellid,GUtranFreqRelation=$arfcnval-$smtcScs-$smtcPeriodicity-$smtcOffset-$smtcDuration,GUtranCellRelation=$ExtGCellIdVal pr $gutrelmo if $nr_of_mos = 0 l echo "crn $gutrelmo" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "neighborCellRef $neighRefVal" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "isRemoveAllowed false" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "end" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos fi endfunc func CreateEUtranCellFDDGUtranCellRelation for $MO in eFDDCells get $MO ^eUtranCellFDDId$ > $ecellid CreateGUtranCellRelation done endfunc mr ExternalGUtranCells ma ExternalGUtranCells ExternalGUtranCell=.*$nrnodegnbid ma eFDDCells ENodeBFunction=1,EUtranCellFDD= for $extcell in ExternalGUtranCells get $extcell ^gUtranSyncSignalFrequencyRef$ > $gutrafreq get $gutrafreq ^arfcn$ > $arfcnval get $gutrafreq smtcScs > $smtcScs get $gutrafreq smtcPeriodicity > $smtcPeriodicity get $gutrafreq smtcOffset > $smtcOffset get $gutrafreq smtcDuration > $smtcDuration get $extcell ^externalGUtranCellId$ > $ExtGCellIdVal $neighRefVal = ldn($extcell) CreateEUtranCellFDDGUtranCellRelation done mr ExternalGUtranCells mr eFDDCells ############################################################################ ####:----------------> LA GUTRANFREQRELATION Settings <----------------:#### func LA_Settings ma eFDDCells ENodeBFunction=1,EUtranCellFDD= for $mo in eFDDCells $ldn = ldn($mo) pr $ldn,GUtranFreqRelation= if $nr_of_mos > 0 l echo "lset $ldn,UeMeasControl=1$ maxMeasB1Endc $nr_of_mos" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos fi done mr eFDDCells mr gr_gufreq ma gr_gufreq ,GUtranFreqRelation= for $mo in gr_gufreq get $mo gUtranFreqRelationId > $gufreqid $ldn = ldn($mo) $gufreqid = $gufreqid -s -.* if 2016667 <= $gufreqid && $gufreqid <= 2279165 l echo "lset $ldn$ endcB1MeasPriority 3" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos else if 620000 <= $gufreqid && $gufreqid <= 680000 l echo "lset $ldn$ endcB1MeasPriority 2" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos else if 173800 <= $gufreqid && $gufreqid <= 178800 l echo "lset $ldn$ endcB1MeasPriority 1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos else if 386000 <= $gufreqid && $gufreqid <= 440000 l echo "lset $ldn$ endcB1MeasPriority 0" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos fi done mr gr_gufreq mr gr_fdduli ma gr_fdduli ,EUtranCellFDD= primaryUpperLayerInd 1 for $MO in gr_fdduli $ldn = ldn($mo) l echo "lset $ldn,UeMeasControl=1$ endcMeasTime -1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos l echo "lset $ldn,UeMeasControl=1$ endcMeasRestartTime -1" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos done mr gr_fdduli endfunc pv $nodename if $nodename ~ (^CSS|^CVL|^CSL|^CVM|^CVS|^HIG|^CVN|^CSN|^HIL|^CSV|^DXD|^HIS|^CLL|^CLO|^CXL|^NML|^NMN|^CCM) LA_Settings fi l echo "gs-" >> $nodename_Anchor_$NR_Siteid_Relation_script.mos u! $nodename_Anchor_$NR_Siteid_Relation_script.mos l sed -i 's/<ManagedElement><managedElementId>1<\/managedElementId>//g;s/<\/ManagedElement><\/ManagedElement>/<\/ManagedElement>/g' $nodename_Anchor_$NR_Siteid_Relation_script.mos lt all netconf $undoxmlfile l rm $nodename_Anchor_$NR_Siteid_Relation_script.mos l rm $nodename_Anchor_$NR_Siteid_Relation_script.xml l-
Write, Run & Share Perl code online using OneCompiler's Perl online compiler for free. It's one of the robust, feature-rich online compilers for Perl language, running on the latest version 5.22.1. Getting started with the OneCompiler's Perl compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as Perl
and start coding.
OneCompiler's Perl online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Perl program which takes name as input and prints hello message with your name.
my $name = <STDIN>;
print "Hello $name.\n";
Perl(Practical Extraction and Report Language) is especially desined for text processing by Larry Wall.
There is no need to specify the type of the data in Perl as it is loosely typed language.
Type | Description | Usage |
---|---|---|
Scalar | Scalar is either a number or a string or an address of a variable(reference) | $var |
Arrays | Array is an ordered list of scalars, you can access arrays with indexes which starts from 0 | @arr = (1,2,3) |
Hash | Hash is an unordered set of key/value pairs | %ul = (1,'foo', 2, 'bar) |
In Perl, there is no need to explicitly declare variables to reserve memory space. When you assign a value to a variable, declaration happens automatically.
$var-name =value; #scalar-variable
@arr-name = (values); #Array-variables
%hashes = (key-value pairs); # Hash-variables
If, If-else, Nested-Ifs are used when you want to perform a certain set of operations based on conditional expressions.
if(conditional-expression){
//code
}
if(conditional-expression){
//code if condition is true
}else{
//code if condition is false
}
if(condition-expression1){
//code if above condition is true
}else if(condition-expression2){
//code if above condition is true
}
else if(condition-expression3){
//code if above condition is true
}
...
else{
//code if all the conditions are false
}
There is no case or switch in perl, instead we use given and when to check the code for multiple conditions.
given(expr){
when (value1)
{//code if above value is matched;}
when (value2)
{//code if above value is matched;}
when (value3)
{//code if above value is matched;}
default
{//code if all the above cases are not matched.}
}
For loop is used to iterate a set of statements based on a condition.
for(Initialization; Condition; Increment/decrement){
// code
}
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while(condition) {
// code
}
Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.
do {
// code
} while (condition);
Sub-routines are similar to functions which contains set of statements. Usually sub-routines are written when multiple calls are required to same set of statements which increases re-usuability and modularity.
sub subroutine_name
{
# set of Statements
}
subroutine_name();
subroutine_name(arguments-list); // if arguments are present