UNIX2DOS Functionality

后端 未结 2 862
再見小時候
再見小時候 2021-01-28 07:44

/bin/ksh -c \"cat $PMSourceFileDir/RT/TgtFiles/$OutputFileStrPerfHdr $PMSourceFileDir/RT/TgtFiles/$OutputFileStrPerfCSV | unix2dos -437 > $PMRootDir/RT/Temp/$Outp

相关标签:
2条回答
  • 2021-01-28 08:12

    Alternately, as a pure shell approach:

    while IFS= read -r line; do printf '%s\r\n' "$line"; done <in >out
    
    0 讨论(0)
  • 2021-01-28 08:19

    You should be able to use awk or perl to do something similar:

    awk 'sub("$", "\r")'
    

    or

    perl -p -e 's/\n/\r\n/'
    

    oh and also this if you need it:

    recode latin1..ibmpc
    
    0 讨论(0)
提交回复
热议问题