Control: tags -1 - moreinfo

On Fri, 2021-10-29 at 23:08 -0300, Eriberto Mota wrote:

> To:   992...@bugs.debian.org

Please CC submitters when you have questions/comments they should see,
I only saw your message by coincidence when looking at the bug.

> Unfortunately, your script ends with
> 'pipetty: can't allocate a pseudo-terminal: No such file or directory'.

I don't get this on the machine where I tested the script.

It sounds like your test environment doesn't have /dev/pts/ mounted?

> If possible, to create an empty file in Bash, use '> file' instead of
> 'touch file'.

I've adopted that. The script also had some other issues that I fixed;
it was not compatible with dash printf (which doesn't support \xNN),
included unwanted LF bytes and also neglected to truncate the file at
the right place after writing the result string.

Please include this script instead:

   #!/bin/sh
   set -e
   rm -f nonempty empty result
   echo -n nonempty > nonempty
   echo -n > empty
   echo -n result > result
   for f in nonempty empty ; do
     echo "Editing $f in hexedit"
     printf "$f"'\n\tresult\33ty\30y' |
     pipetty hexedit 2>&1 |
     ansi2txt |
     tr '\r' '\n'
   done
   head -vn-0 nonempty empty result ; echo
   for f in nonempty empty ; do
     cmp "$f" result
   done

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to