Skip to main content
Apr 6, 2018 2:43 PM UTC

File encoding tags erased by sed -i

Here’s a sequence of commands I just entered in USS:

14:38 /u/tstjv > ls file                                            
t IBM-1047    T=on  -rwxr-xr-x  nl     1         5 Apr  6 14:38 file
14:38 /u/tstjv > sed -i 's/f/p/g' file                              
14:39 /u/tstjv > ls file                                            
- untagged    T=off -rwxr-xr-x  ----   1         5 Apr  6 14:39 file

As you can see, the EBCDIC encoding is lost. Does anybody know what’s going on? Thanks.

Edit: command -v sed yields /rsusr/ported/bin/sed.

    1 reply

    Tatiana Balaburkina
    Rocketeer
    Apr 9, 2018 1:09 AM UTC

    Here’s a sequence of commands I just entered in USS:

    14:38 /u/tstjv > ls file                                            
    t IBM-1047    T=on  -rwxr-xr-x  nl     1         5 Apr  6 14:38 file
    14:38 /u/tstjv > sed -i 's/f/p/g' file                              
    14:39 /u/tstjv > ls file                                            
    - untagged    T=off -rwxr-xr-x  ----   1         5 Apr  6 14:39 file
    

    As you can see, the EBCDIC encoding is lost. Does anybody know what’s going on? Thanks.

    Edit: command -v sed yields /rsusr/ported/bin/sed.

    Hi Tony,

    Thanks for reporting. We will review this issue.
    Ticket