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
1
answer
91
views
How to get the return value of pipe and executable on Windows
I am running some unit tests which involve piping into my executable, like this.
cat text.txt | my_exe --options
Running these commands, how do I get the return value of my_exe? Even when my_exe ...
0
votes
1
answer
346
views
how to output only a specific known line number using cat or head/tail
I know how to use head or tail to output a certain number of lines, but how do I output only a specific line number(s)?
Something like:
head --only-line=73 <file>
2
votes
1
answer
203
views
cat files based on substring match
I have file names in the following format and I would like to cat files based on substring match(Orange,Apple) and a constant(S4,S5),
file names example _S6_trimmed_, _S8_trimmed_, _S9_trimmed_, ...
-2
votes
1
answer
53
views
Atime don't change on mounted drive
i have CentOS Stream 9.
when i mount a usb drive and create a file using touch command the Access time in stat command don't change and stays:
"Access: 2023-06-20 03:00:00.000000000 +0300"
...
1
vote
0
answers
716
views
cat through ssh does not work, it hangs on "debug2: exec request accepted on channel 0" and scp never finishes
I trying to print a file through ssh on CentOS7 but it does not work somehow :
$ time timeout 60s ssh -vvv SERVER-01 cat /etc/yum.repos.d/CentOS-Base.repo
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan ...
2
votes
0
answers
44
views
Cat with gun parallel does not continue as expected
Here is my code.
file_name="all_parts"
find parts/ -type f > ${file_name}
while read part
do
echo processing ${part}
cat ${part} | parallel -j 100 'wget {} -o logs/...
1
vote
1
answer
580
views
How does Git for Windows' cat.exe deal with charset encoding?
I'm testing the behaviour of Windows terminal (cmd.exe) in relation to charset encodings. I have some test files in several encodings (Win1252, CP437, UTF-8, etc) with the Spanish text: "qué tal&...
0
votes
1
answer
83
views
Set default editor [duplicate]
I would like to configure a program named howdy which allows you to login using your face.
For this I need to edit the config file to add the path to my camera.
However when I execute sudo howdy ...
0
votes
1
answer
92
views
Concatenate pairs of mp3 files with ffmpeg or cat?
I've got a directory of mp3 files, which look a little like this:
Blue Elephant part 1.mp3
Blue Elephant part 2.mp3
Tale of Two Cities part 1.mp3
Tale of Two Cities part 2.mp3
Lookism part 1.mp3
...
0
votes
1
answer
611
views
How to cat a local file to a remote printer using Linux
On DOS we can:
NET USE LPT1: \\remote-pc\shared_printer
COPY file.txt > LPT1
I know on Linux I can print to local usb printer:
cat file.txt > /dev/usb/lp2
But how to print to a remote (Linux ...
1
vote
1
answer
1k
views
Is there a way to pass an ffmpeg command from a text file in Windows?
I was wondering if there was a way to pass one (or multiple) arguments from a text file for ffmpeg.
I tried a bit here with this in powershell (expecting it to work like linux but to no avail
ffmpeg -...
0
votes
2
answers
52
views
if statement - simple bash scripting
I am working on a simple script that checks if there is .vimrc file and what is configured in that file:
if [ "$(ls -a /root | grep .vimrc)" = ".vimrc" ]; then
echo "...
0
votes
1
answer
202
views
What is a unix cat -e analog in windows powershell?
I use Windows 10 Powershell and I want to see a file's content with a printed $ character at the end of each line, prior to the NEWLINE.
In UNIX-like systems, I can do: cat -e file_name. Could I get ...
2
votes
1
answer
1k
views
concatening a variable to a file using cat
I wanted to do a bash function that given a text variable, it would concatenate it to a file. i.e
function print() {
cat << 'EOF' >> file
This $1 is a variable
EOF
}
But it wouldnt work. ...
2
votes
1
answer
5k
views
how do i combine 2 pdf documents into 1 in the terminal?
I have 2 files written in Markdown which I used pandoc to convert into pdf. I now need to combine the 2 into one single document(lets say I have many that I need to combine into a single pdf). Is ...