TYPE beeping?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#3
Sep 11, 2012
57
1
#4
Thanks for educating me :)

I have not thought about this since the DOS/BBS days, well around 1988-1992 - so you are right....

Guess the tpipe command could be useful:

13 – Remove binary characters
Removes binary characters such as those higher than ASCII code 127, and
those less than ASCII code 32 except for carriage returns (ASCII code 13) and line feeds (ASCII code 10).
This filter if very useful if you have a corrupted text file, or if you just want to see what text is inside a
binary file. The binary information is removed, leaving you with just the text.


From: http://jpsoft.com/help/index.htm?tpipe.htm

-stein
 
May 30, 2008
205
1
#5
I thought there was some recent change that stopped TYPE from beeping when it came upon a 0x07? It's beeping. Am I remembering incorrectly?
As I understood it was the FFIND command that was supposed to no longer write 0x07 characters to the console.
 
#8
Type HELP TYPE and look for the /B option.
I see. And that's not new. But it doesn't work correctly. Xavetemp.btm is a BATCOMP'd file and TYPE with /B stops after only a few characters (not having reached a BEL).
Code:
v:\> type /b xavtemp.btm
╛δ╗
v:\> type xavtemp.btm
╛δ╗ ê♥S╖w¶αß°!S!Wu╕▀▓s╬↕rFÇTǺ╜└Y¶↑♀è∙ C«♀♀æ♀▬O₧w∞Q-r.╞╜αr╬╩¼÷←"ó4.▓¼v5.Rä╒σ╬2∙A
ñn§Dm*û$∙Z▼◄═ü/*►1&f8╗ dLj#─B²>0╣♫╫╤╘P╬Üπ&,┐8σ☻ú≥╟►↕♥ì☼w&♀,╤Ä>☻û,¼─oûóà╙╘T≡└╫↑+♠
SNIP!
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#9
Hunh. It used to work. Now it seems to lose track of the end of the file.

Code:
C:\BIN\JPSDK\TextUtils>type "Engine Summer.txt"

    ThereΓÇÖs a time in some years, after the first frosts, when the sun gets hot
again, and summer returns for a time.  Winter is coming; you know that from the
way the mornings smell, the way the leaves, half-turned to color, are dry and
poised to drop.  But summer goes on, a small false summer, all the more
precious for being small and false.  In Little Belaire, we called this time ΓÇö
for some reason nobody now knows ΓÇö engine summer.

                                        ΓÇö John Crowley

C:\BIN\JPSDK\TextUtils>type ControlChars.txt
This is an escape sequence:   test
This is a control character:
This is another control characters:  ☺
Here are some tabs:     One     Two     Three

C:\BIN\JPSDK\TextUtils>type /b ControlChars.txt
This is an escape sequence:   test
This is a control character:
This is another control characters:  ☺
Here are some tabs:     One     Two     Three
from the
way the mornings smell, the way the leaves, half-turned to color, are dry and
poised to drop.  But summer goes on, a small false summer, all the more
precious for being small and false.  In Little Belaire, we called this time ΓÇö
for some reason nobody now knows ΓÇö engine summer.

                                        ΓÇö John Crowley

C:\BIN\JPSDK\TextUtils>
 

rconn

Administrator
Staff member
May 14, 2008
10,096
85
#10
I see. And that's not new. But it doesn't work correctly. Xavetemp.btm is a BATCOMP'd file and TYPE with /B stops after only a few characters (not having reached a BEL).
It *does* work correctly; however, TYPE /B is intended for removing bells from text files, not for dumping binary files.

I assume there must be some reason why users want to use the (wildly inappropriate) TYPE command for binary files, but I haven't seen it articulated yet.
 
#11
It *does* work correctly; however, TYPE /B is intended for removing bells from text files, not for dumping binary files.

I assume there must be some reason why users want to use the (wildly inappropriate) TYPE command for binary files, but I haven't seen it articulated yet.
TYPE /B doesn't even work correctly on plain text files (as Charles pointed out).
Code:
v:\> echo line 1^r^nline 2 > textfile1.txt

v:\> echo line A > textfile2.txt

v:\> type textfile1.txt
line 1
line 2

v:\> type textfile2.txt
line A

v:\> type /b textfile1.txt
line 1
line 2
♦         --------------- garbage at the end
v:\> type /b textfile2.txt
line A
line 2   ---------------- from the other file!
♦        ---------------- leftover garbage?
v:\>