0
votes
2answers
60 views

cat wc -l count lines line with defined line endings (e.g Mac OS X specific)

As any command-line user I sometimes want to count lines in text file with well known command: cat some_text_file | wc -l I face the problem on Mac OS X, which as far I have it studied is connected ...
1
vote
4answers
2k views

How can I stop cat output immediately despite massive output?

I'm looking for someway to stop the output to STDOUT when I realize a command is wrong. For instance, if I accidentally cat a very large file. Usually it will eventually stop if you hold down ctrl + ...
3
votes
5answers
4k views

How to display the file contents recursively?

I always have to submit the source codes in my printed assignment report. I have to copy and paste my course codes into the document and I find that it is an annoying task. I want to solve this "copy ...
1
vote
1answer
82 views

How do I create a new file with text outputted from a command?

I just want to create a file with the outputted text from a command, rather then copying and pasting & making a new file by hand. I'm on a unix machine - how do I do this?
0
votes
1answer
397 views

Cat file to terminal at particular speed of lines per second

I'm lazy and I could write a script to do this, but I'm even too lazy to think of how to do it. I often do things like : cris$ python runexperiment.py > output.txt cris$ cat output.txt ...
0
votes
1answer
66 views

What is going wrong with cat

i have a very basic cat problem. I have 23 files, all is one line and around 100000 columns. I am trying to merge these one lines. I type the command cat test1 test2 > outcome The command line is not ...
36
votes
2answers
38k views

What is the Windows equivalent of the Unix command cat?

I want to do exactly what unix "cat" does, but on my PC. Is there a simple equivalent command for the Windows command line? Specifically I want to create a file from all the files of a given type in ...
0
votes
3answers
263 views

What will happen when I 'cat' 'ksh'?

I used the following command in my unix box. $ cat ksh And it gave a rolling log of latin and greek letters and symbols and it kept on going with no signs of stopping. Eventually I had to close my ...
21
votes
6answers
2k views

What is the general consensus on “Useless use of cat”?

When I pipe multiple unix commands such as grep, sed, tr etc. I tend to specify the input file that is being processed using cat. So something like cat file | grep ... | awk ... | sed ... . But ...
2
votes
2answers
165 views

Why does cat not use options the way I expect UNIX programs to use switches?

I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I ...
3
votes
2answers
499 views

cat on Mac OS X never exits

I'm a bit of a UNIX noob, but I'm trying to run the cat command to make a simple text file and it works great, however cat is never exited after making the file. For instance, I type cat > ...