나는 txt 파일에서 char로 char을 읽고 변경하는 것이 더 나은가요? 또는 txt 파일을 xml로 변환 한 다음 파일을 변경하는 것이 더 낫습니다. 내가 TXT 한 파일 :더 나은 .txt 또는 .xml
Record: 1
{
choice = mobileToMobile:{
subscriberServicesIndicator = 09,
callIdentificationNumber = 70 CD BE,
recordSequenceNumber = 40 63 0F,
typeOfCallingSubscriber = 01,
callingPartyNumber = 41 27 27 19 66 91, -> needs to be changed to 41 72 72 91 66 19
calledPartyNumber = 31 27 37 72 73 10, -> needs to be changed to 31 72 73 27 37 10
disconnectingParty = callingPartyRelease,
dateForStartofCharging = 14 0C 01 1F, -> change from hexadecimal to decimal number
timeForStartofCharging = 0A 35 00, -> ...
timeForStopofCharging = 0A 38 1D, ->
chargeableDuration = 00 03 1E,
interruptionTime = 00 00 00,
timeFromRegisterSeizureToStartOfCharging = 00 00 07,
calledSubscriberInitialServingCellID = 02 06 33,
originForCharging = 00,
}
}
Record: 2
{
...... so on
}
XML은 "XML을 기대하는이 정보에 어떻게 정보를 얻습니까?"를 제외한 거의 모든 문제에 대한 해결책입니다. 유연성을 제공하지 않으면 서 복잡성이 추가되기 때문입니다. awk 나 Perl은 여러분이 보여준 문제를 빨리 처리 할 것입니다. – msw