Skip to main content
Share Your Experience: Take the 2024 Developer Survey
43 votes

Why does cat with no argument read from standard input?

This is not specific to cat. It's a general rule in Unix that, if there are no arguments, the program reads from standard input. This is also true of grep, od, sort, split, uniq, wc, and so on. ...
user24811's user avatar
  • 1,617
38 votes

Why does cat with no argument read from standard input?

'cat' fits the pipeline model, which says that for a program with one input and one output, it should read from stdin and write to stdout, at least by default in the case that no files are specified. ...
dave's user avatar
  • 35.7k
35 votes
Accepted

Where was the DOS cdd utility from?

I remember CDD as a 4DOS command, which would have been available in the Norton Utilities as NDOS. JP Software’s other shells also implement CDD, so 4OS2 and 4NT users would probably recognise it too. ...
Stephen Kitt's user avatar
24 votes
Accepted

Memory requirements for undelete command

“Regular” UNDELETE relies only on the standard MS-DOS deletion behaviour: when a file is deleted, the first character of its file name is replaced with a deletion marker, and its clusters are freed. ...
Stephen Kitt's user avatar
17 votes
Accepted

Why does cat with no argument read from standard input?

TL;DR: In UNIX version 1, the easiest way to get unfiltered, human-typed input onto the standard output was with an argument-less cat. A few versions later, echo would provide another simple means to ...
bishop's user avatar
  • 294
14 votes

What was the first two-panel file manager for DOS?

I think that both PathMinder and Bourbaki’s 1dir predate your examples, but I don’t know if they are the first DOS-specific dual-pane file managers. PathMinder was first published in 1984, 1dir (...
Stephen Kitt's user avatar
13 votes

Unix utility "smiley" to decode emoticons: Where to get it?

The smiley program was posted to the comp.sources.misc Usenet newsgroup multiple times. Here is the description from the Volume 20, Issue 73 posting: Submitted-by: DaviD W. Sanderson Posting-...
Ken Gober's user avatar
  • 11.4k
10 votes
Accepted

What is the history of data compression tools on personal computers?

The story is told in this 1988 usenet post by Paul Homchick: Some time went by and it was a CP/M world, and diskettes were bigger. In 1981 Richard Greenlaw released SQ and USQ, based on Huffman ...
sendmoreinfo's user avatar
8 votes

Why does cat with no argument read from standard input?

I’ve frequently used cat > somefile.txt to create a file quickly, and most other long-time UNIX users have as well. It was quicker and more convenient than vi over a slow connection, and much more ...
Davislor's user avatar
  • 8,745
5 votes

Looking for a 90s Macintosh background pattern collection

I don't remember if it contains those specific backgrounds, but one pack that otherwise matches your description is included among the freeware bundled with the Demo releases of Executor from before ...
ssokolow's user avatar
  • 7,065
5 votes
Accepted

Unix utility "smiley" to decode emoticons: Where to get it?

If you want to get it running on a modern Posix system, here's what you can do. Get the source from this archive. (This is a more recent version than the one cited in the other answer.) Follow the ...
texdr.aft's user avatar
  • 3,495
5 votes
Accepted

How did Atari cassette "turbo without hardware mods" work?

Actually, in that case, no fancy algorithm changes were used - the tape recorder was literally "overclocked" - frequency of interrupts handling communication with the tape recorder changed. I found a ...
SF.'s user avatar
  • 7,105
5 votes

How did Atari cassette "turbo without hardware mods" work?

If one doesn't need particularly high data rates, it's possible to implement data-to-audio and audio-to-data routines in a very small amount of code. To store a "1", generate 250us of high followed ...
supercat's user avatar
  • 36.6k
5 votes
Accepted

Is there a KiCad library with parts used in retrocomputers?

People do use KiCad for this job! The S100 Computers group have created many, many boards using KiCad (included in the list here) and provide the KiCad files used to create each of them. Including the ...
wizzwizz4's user avatar
  • 18.6k
4 votes

Why does cat with no argument read from standard input?

I use cat without arguments all the time, for exactly the purpose it accomplishes. For example, I edit some unrelated file with joe editor (put your other favorite editor here, this is mine) and I ...
Matija Nalis's user avatar
4 votes

How did Atari cassette "turbo without hardware mods" work?

With Atari, some or combination of the following practices were used: Increasing block size from default 128 bytes to more bytes. Fewer blocks resulted in fewer overhead bytes (calibration sequence, ...
Vinicius's user avatar
3 votes

Why does cat with no argument read from standard input?

@user24811 already covered the background, so just an addendum - displaying help and quitting breaks the pipeline model. I do not want the remains of a "helpful message" on file after it has ...
Tatjana Heuser's user avatar
3 votes

Why does cat with no argument read from standard input?

There are use-cases where it makes sense. Imagine you want to type or cut&paste text and save it to a file, without starting an editor. A simple cat > file.txt can run in a terminal and you ...
AnoE's user avatar
  • 1,579
2 votes

Why does cat with no argument read from standard input?

Unix was designed on systems very different from the Unix systems of today. On a typical system today, it's possible to have multiple processes running simultaneously, and even when time slicing is ...
supercat's user avatar
  • 36.6k
1 vote

Why does cat with no argument read from standard input?

There are lots of use-cases where stdin is a TTY but stdout isn't, as a way to get keyboard or copy/paste input into other things, like cat >> file, as other answers mention. I've also seen cat ...
Peter Cordes's user avatar
  • 3,197
1 vote

Why does cat with no argument read from standard input?

Another approach often used in scripts is variable pipelining, e.g. someTool --args | $filter > "$outfile" here the filter=cat allows to save a plaintext file, and a filter="gzip -9&...
Jim Klimov's user avatar
1 vote

What was the first two-panel file manager for DOS?

The original XTree was released in early 1985 so predated Norton Commander, I believe. I'm not entirely certain that this first version had split screen (dual panel) but I know my trusty copy of XTree ...
paxdiablo's user avatar
  • 4,877

Only top scored, non community-wiki answers of a minimum length are eligible