1
想象一下你的腳本輸出像一些真正奇怪的輸出:總結新線過長的字符串輸出在bash
fdjsagnfafeowkagfdsngodagfoeagnfiosnthoaogjerapogrjeagnfdosngtnsrhig ofskhnIAGNRIEAGPREAOGJRIAEGRNIEOASGNFAIGRNESUIGRIOAEGRNIAENGRUEAOREANFDOIGNRUESIGORNAEIGNREIOAGRIUESGRJOEAGRNEOSIGRNEPAGRJAEIO
廢話,我知道。也許這樣看起來會更好:
fdjsagnfafeowkagfdsngodagfoeagnfiosnthoaogjera
pogrjeagnfdosngtnsrhig ofskhnIAGNRIEAGPREAOGJR
IAEGRNIEOASGNFAIGRNESUIGRIOAEGRNIAENGRUEAOREAN
FDOIGNRUESIGORNAEIGNREIOAGRIUESGRJOEAGRNEOSIGR
NEPAGRJAEIO
我想在bash中用base64編碼的字符串數據做到這一點。我怎麼能這樣做?
閱讀此:http://stackoverflow.com/a/20065991/797495 –
你應該能夠存儲輸出作爲變量,然後嘗試像這樣:'echo $ varname | base64' – ryekayo
我沒有使用java,也沒有包裝解析輸出。我正在包裝它,因爲如果我沒有,它會迷路。數據通過網絡發送,而且非常複雜。 –