Questions tagged [cat]
A UNIX utility for concatenating files or input streams together. Do not use for questions about the animal.
143
questions
0
votes
2
answers
2k
views
What's the behaviour of `cat | less`?
I tried to run the following command:
cat | less
I know both commands require something from the standard input.
When I run it that's what I expected: all my inputs goes to cat and I will not be ...
2
votes
3
answers
4k
views
add new line after every end of file's contents while merging multiple files
I have written shell script to merge different file's contents I have created directories f1,f2,d1,d2 and files under them , I need to merge all files's contents : comand is
(find /home/ah5024331/f1 ...
1
vote
1
answer
179
views
Empty line appears while merging different file contents in shell script
I have written shell script to merge different file's contents I have created directories f1,f2,d1,d2 and files under them , I need to merge all files's contents : comand is
find /home/ah5024331/f1 /...
0
votes
1
answer
643
views
Piping a line of the file read with while read loop
I am trying to read each line of the file and then assign some parts of it to variables. A line itself is read as a variable so I need to process a variable input say for cat which seems to be ...
0
votes
2
answers
1k
views
How to merge multiple files into single file in given directories
I want to write a shell script to merge contents of multiple files in a given directories.
DIR1 contains sample1.txt sample2.txt
sample1.txt contents :---this is sample1 file---
sample2.txt ...
0
votes
0
answers
1k
views
cat > $FILE_NAME << EOF - Explanation of the inner workings
I know what this one does, I learned "pattern like" and just works.
I also know:
that > is a redirect to a file
that << is also a redirect to file see below
EOF is just a placeholder, when ...
33
votes
3
answers
48k
views
Using -replace on pipes in powershell
I want to test out a replace before I use it, so I'm trying to write a quick online command to see what the output is. However, I'm not sure what the syntax is. What I want to do is something like
...
0
votes
0
answers
561
views
How to uninstall screen (monitor / display) drivers?
While testing out some different computer screens (also called displays or monitors) on a Windows 7 SP1 system, I installed the .INF files for each screen. I also installed the .ICM (color matching ...
3
votes
4
answers
2k
views
Prevent cat from opening a binary file
Is there a way to prevent or prompt you when trying to cat binary files?
Oftentimes I need to work with log files or data files, some of which are text and others not. It's easy to get mixed up, and ...
1
vote
2
answers
664
views
Is cat output modified by writing to the file
With a piped command sequence like:
$ cat afile | somecommand | tee afile
afile is both read (by cat) and written (by tee).
The question is, supposing afile is at least several megabytes (or large ...
0
votes
2
answers
91
views
Combine the results of a CAT and TAC in a single window in Linux
I have two log files which I would like to view on my screen simultaneously. Below you can see my commands:
pi@raspberrypi ~ $ watch -n 1 tac /home/pi/log/log.txt
pi@raspberrypi ~ $ watch -n 1 cat /...
17
votes
2
answers
6k
views
lossless concatenation of ogg vorbis files
I have a couple of ogg vorbis files, all encoded with the exact same properties that I want to concatenate into a single file.
I know that the ogg vorbis format supports plain concatenation of ...
0
votes
0
answers
146
views
Unix cat to Windows user
I uploaded about 6GB of video in 3 separate files created using the cat command on my Mac, thinking the recipient of those files was a Mac user as well. It turns out he's using Windows 8. How can he ...
2
votes
2
answers
4k
views
linux cat into file including exiting code all from copy+paste
Can I print out a code to STDOUT that would mimic the behavior of Ctrl+c inside cat? E.g. I would like my script to print out the cat command followed by the content of the file like this:
cat > /...
0
votes
2
answers
162
views
how to clone a directory list to another directory
I am trying clone a directory and it's subdirectories into another directory. I have hundreds of music directories with sub-directories that I want to convert from flac to ogg. I want all the music ...