Questions tagged [cat]
A UNIX utility for concatenating files or input streams together. Do not use for questions about the animal.
143
questions
4
votes
2
answers
11k
views
Piping commands into nc
I've seemingly searched many very similar questions but never quite found something to work. I'm trying to use a raspberry pi (2nd gen) to communicate with a Wifi OBDII sensor. I'm able to use the ...
0
votes
1
answer
1k
views
Grep with multiple patterns used on the command
A few days ago I installed Centos 7 on my server and run ssh. Now I want to track logs. Is there anyway to combine cat or tail with grep to have clear failed and accepted login attempts list from a ...
14
votes
2
answers
9k
views
Print (decrypt) a vim encrypted file
I use the -x option in vim to encrypt a file. I read this files much more times than I write to it, so I always use cat and then remember it is encrypted because of what it shows.. So then I have to ...
1
vote
1
answer
460
views
cat files from pipe
I have to join files to one original file, which was split. There is a catalog, in which there are a lot of files,but no every is necessary. I have file with md5sum, which contain md5sum files I have ...
0
votes
1
answer
1k
views
Can router bottleneck LAN traffic over Ethernet?
Say I have a 100mb router and I'm using cat 6 cables connecting 2 PCs to the router, will I be able to achieve 1gb transfers between the 2 PC's via the network or will it only get upto 100mb?
0
votes
1
answer
1k
views
Tar & save the output of a command
I want to tar the output of a command, say cat hello.world, to a compressed tar file.
I don’t want to save a temporary file and later tar it manually.
How can I do this?
0
votes
2
answers
2k
views
Recover text file that I deleted with "cat" command
I used
cat > filename
while not thinking about it, then hit
ctrl + c and naturally enough the file is now empty... Is there a way to recover that file's contents?
-1
votes
3
answers
205
views
How to use the command "read" on a Shell script which reads its arguments from stdin
First of all, thank you for your help in advance and sorry in case this was answered before. I have not been able to find it.
For helping to understand my question, I have written the following ...
1
vote
1
answer
4k
views
To print values in diferent line in mail body shell script
Below is the code to print contents of files present in the directory
File contents are :
apple
banana
grapes
mango
names=()
FILES=/path_to_dir/*
for f in $FILES
do
names+=($f)
done
...
2
votes
1
answer
17k
views
Receiving data from Serial Port
I want to receive data from RS232 Serial port to my terminal and with a directive to a file. It should be pretty straight forward.
cat /dev/ttyS0
cat /dev/ttyS0 > file.txt
Before that I've ...
1
vote
0
answers
75
views
Cat playing with mouse broke my Windows/Explorer :( Cannot click buttons in most of standard apps/menus
My mouse was laying on a sofa (I was going to clean it a bit) and my cat suddenly decided to play with the mouse (while the start menu was opened). Nothing serious happened with it during these 10 ...
-1
votes
1
answer
177
views
Using wildcards with cat append target
I need to append the contents of two files to a third, where I don't know the exact file name of the target. Let's say it's named targetXXXXX where XXXXX is a random string. I am basically trying to ...
20
votes
2
answers
60k
views
pipe and stdin redirection to cat
Why does
echo "hello world" | cat
works while
cat < echo "hello world"
does not? My (incorrect) intuition is that pipe would redirect stdout to cat as stdin.
0
votes
2
answers
44
views
shell - multiple text insertion into each line of a file
I have a text containing coordinates of points such as x, y and z, I would like to change each line to be like:
Point{ (1000+linenumber) } = {x , y, z};
What I want is: for example for line 212 ...
0
votes
1
answer
311
views
/usr/bin/mail not interpreting new lines
I have a strange problem when piping a cat to mail.
I have a simple text file which has been compiled from a script, which is a report on what folders were copied in the script. I then want to send ...