Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

30 votes
7 answers
31505 views
How to cat files together, adding missing newlines at end of some files
I have a bunch of `.text` files, _most_ of which end with the standard nl. A couple don't have any terminator at end. The last physical byte is (generally) an alphameric character. I was using `cat *.text >| /tmp/joined.text`, but then noticed a couple of places in joined.text where the first line o...
I have a bunch of .text files, _most_ of which end with the standard nl. A couple don't have any terminator at end. The last physical byte is (generally) an alphameric character. I was using cat *.text >| /tmp/joined.text, but then noticed a couple of places in joined.text where the first line of a file appeared at the end of the last line of a previous file. Inspecting the previous file, I saw there wasn't a line terminator -- concatenation explained. That raised the question, what's the easiest way to concatenate, sticking in the missing newline? What about these options? 1. A solution that might effectively add a blank line to some input files. For me, that's not a problem as the processing of joined.text can handle it. 2. A solution that adds the cr/fl only to files that do not already end that way.
HiTechHiTouch (991 rep)
Feb 16, 2017, 07:17 PM • Last activity: Jul 23, 2025, 10:22 AM
77 votes
18 answers
87224 views
Is there ever a reason to use `cat` when you've got `less`?
I used to use `cat` to view files. Then I learned that `less` is usually better, and is a must if the file is longer than a few dozen rows. My question: Is there ever a reason to use `cat` instead of `less`? Is there any situation where `cat` is a better solution?
I used to use cat to view files. Then I learned that less is usually better, and is a must if the file is longer than a few dozen rows. My question: Is there ever a reason to use cat instead of less? Is there any situation where cat is a better solution?
Ram Rachum (1895 rep)
Sep 27, 2011, 08:33 PM • Last activity: Jul 12, 2025, 11:09 AM
1 votes
1 answers
1889 views
cat: -: Resource temporarily unavailable
I want to add some text to a file. Using the following command: $ cat > file And getting the following error: cat: -: Resource temporarily unavailable What is happening? how to debug this?
I want to add some text to a file. Using the following command: $ cat > file And getting the following error: cat: -: Resource temporarily unavailable What is happening? how to debug this?
manish ma (111 rep)
Oct 6, 2020, 08:32 AM • Last activity: Jul 9, 2025, 03:01 AM
0 votes
5 answers
570 views
How can I `cat` files with a number of fixed lines before/between/after?
I am looking for a bash one-liner which can `cat` a number of files with a number of fixed lines. file1.txt: file1 line 1 file1 line 2 file2.txt file2 line 1 file2 line 2 Then I am looking for something like cat-with-strings foo file1.txt bar file2.txt baz producing output foo file1 line 1 file1 lin...
I am looking for a bash one-liner which can cat a number of files with a number of fixed lines. file1.txt: file1 line 1 file1 line 2 file2.txt file2 line 1 file2 line 2 Then I am looking for something like cat-with-strings foo file1.txt bar file2.txt baz producing output foo file1 line 1 file1 line 2 bar file2 line 1 file2 line 2 baz How can I do this in a single line of bash, using standard linux tools (sed, awk, cat, etc) and *without* creating any files to hold foo, bar, or baz?
spraff (951 rep)
Jan 25, 2021, 07:00 PM • Last activity: Jul 7, 2025, 08:30 AM
0 votes
1 answers
99 views
Should my cat utility support multiple keys simultaneously?
So, i was given a task to implement simple version of cat utility. It should support some of GNU keys, for given text returns the same results as real cat utility and i was given this synopsis: ``` cat [OPTION] [FILE]... ``` What i want to know can my utility be called with multiple keys or just wit...
So, i was given a task to implement simple version of cat utility. It should support some of GNU keys, for given text returns the same results as real cat utility and i was given this synopsis:
cat [OPTION] [FILE]...
What i want to know can my utility be called with multiple keys or just with one?
cat -b file
or
cat -b -s -e file
[POSIX](https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/)(in BaseDefinions, chapter 12) says: > The notation used for the **SYNOPSIS** sections **imposes requirements on the implementors of the standard utilities** and provides a simple reference for the application developer or system user. And it the same chapter [POSIX](https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/) says: > Ellipses ( "..." ) are used to denote that **one or more** occurrences of an operand **are allowed**. --- So if **OPTION** can be repeated, why there is no ellipsis after it in synopsis? For example, there is an ellipsis [man7.org](https://man7.org/linux/man-pages/man1/cat.1.html) :
-plaintext
cat [OPTION]... [FILE]...
but not [gnu.org](https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html)( but this cat allows many options):
-plaintext
cat [option] [file]...
Can someone explain should my program work with many keys at a time and why? And why [gnu.org](https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html) doesn't follow this(ellipsis) utility syntax convetion?
Mark (99 rep)
May 29, 2025, 11:14 AM • Last activity: May 29, 2025, 05:35 PM
201 votes
7 answers
594197 views
With the Linux "cat" command, how do I show only certain lines by number
If I use `cat -n text.txt` to automatically number the lines, how do I then use the command to show only certain numbered lines.
If I use cat -n text.txt to automatically number the lines, how do I then use the command to show only certain numbered lines.
Geckono1 (2119 rep)
Jun 8, 2016, 07:17 PM • Last activity: May 7, 2025, 09:50 PM
43 votes
4 answers
42323 views
How to pipe a remote file to stdout over scp or sftp?
Using ssh, it is easy to print the contents of a file using ssh host 'cat file.txt' When ssh is disabled, and only SFTP is enabled, running the previous command gives the following error: > This service allows sftp connections only. To work-around this issue, I could create a temporary file using `s...
Using ssh, it is easy to print the contents of a file using ssh host 'cat file.txt' When ssh is disabled, and only SFTP is enabled, running the previous command gives the following error: > This service allows sftp connections only. To work-around this issue, I could create a temporary file using scp or sshfs (as shown below), but that looks really ugly. What is the proper way to print the contents of a remote file when SSH is disabled? mkdir tmpdir sshfs host: tmpdir cat tmpdir/file.txt fusermount -u tmpdir # This does not work! scp -v host:file.txt . shows # "Sink: This service allows sftp connections only." scp host:file.txt . cat file.txt rm file.txt
Rob W (998 rep)
Jul 28, 2014, 04:40 PM • Last activity: Mar 7, 2025, 08:34 PM
0 votes
1 answers
63 views
How can I use a here-document on the left-hand side of a pipeline?
Show lines passed by here-document in the stdout: cat <<EOF foo bar baz EOF foo bar baz I want to match some string with grep via pipe: cat <<EOF foo bar baz EOF |grep 'ba' Why can't pass the stdout through pipe for grep command?
Show lines passed by here-document in the stdout: cat <
showkey (499 rep)
Feb 14, 2025, 04:06 AM • Last activity: Feb 14, 2025, 07:50 AM
302 votes
9 answers
1507965 views
How can I display the contents of a text file on the command line?
I would like to display the contents of a text file on the command line. The file only contains 5-6 characters. Is there an easy way to do this?
I would like to display the contents of a text file on the command line. The file only contains 5-6 characters. Is there an easy way to do this?
Sam Weinberg (3133 rep)
Aug 11, 2013, 03:41 AM • Last activity: Dec 26, 2024, 03:39 AM
5 votes
3 answers
8404 views
How to monitor a serial connection @ 250000 baud?
I wish to directly monitor the serial-over-usb connection to my 3d printer, which runs at 250000 baud. e.g I might monitor it with `cat /dev/ttyUSB0` However first I need to set the baud rate, e.g `stty -F /dev/ttyUSB0 115200` But if I try and set the baud rate to 250k, it fails: `stty -F /dev/ttyUS...
I wish to directly monitor the serial-over-usb connection to my 3d printer, which runs at 250000 baud. e.g I might monitor it with cat /dev/ttyUSB0 However first I need to set the baud rate, e.g stty -F /dev/ttyUSB0 115200 But if I try and set the baud rate to 250k, it fails: stty -F /dev/ttyUSB0 250000 gives result: stty: invalid argument 250000 It appears that baud rate 250000 is not supported under Ubuntu/Mint. Can anyone suggest an alternative way to monitor this serial connection?
Mtl Dev (533 rep)
Nov 30, 2016, 10:03 PM • Last activity: Dec 22, 2024, 03:13 PM
0 votes
2 answers
123 views
Move a Linux/Windows setup to a larger SSD
I want to move a dual boot Windows 7 and Linux Mint installation to a larger drive. Right now they exist on a 500GB Samsung SSD. Windows has 289.84 Gib, Linux has 175.42 Gib. I was thinking of `dd` or `cat` the `boot/efi` partition to the beginning of a new 500GB SSD then `dd` or `cat` the Widows 7...
I want to move a dual boot Windows 7 and Linux Mint installation to a larger drive. Right now they exist on a 500GB Samsung SSD. Windows has 289.84 Gib, Linux has 175.42 Gib. I was thinking of dd or cat the boot/efi partition to the beginning of a new 500GB SSD then dd or cat the Widows 7 partition to right after it. Hopefully leaving the rest of the space on that drive unallocated which I can expand later from within windows. Then dd or cat the Linux partition to another 250GB drive. All this would have to be done from a live CD. Then I unplug the Windows/Linux drive and plug in the two new drives and go into the BIOS so I can boot from the Linux drive. Then update-grub and I should have my GRUB boot menu back. Any ideas on weather this will work? Is there an easier way to give these Windows/Linux installations more space and not lose anything? I bet there would be other people who would want to do something similar since SSDs have become cheaper.
user256282 (39 rep)
Nov 19, 2024, 05:22 PM • Last activity: Nov 29, 2024, 08:24 PM
44 votes
12 answers
92549 views
How can I "cat" a file and remove commented lines?
I'd like to know if there is a way that I could `cat` file like `php.ini` and remove all lines starting with `;` For example, if the file contained this: ; - Show all errors, except for notices ; ;error_reporting = E_ALL & ~E_NOTICE ; ; - Show only errors ; ;error_reporting = E_COMPILE_ERROR|E_ERROR...
I'd like to know if there is a way that I could cat file like php.ini and remove all lines starting with ; For example, if the file contained this: ; - Show all errors, except for notices ; ;error_reporting = E_ALL & ~E_NOTICE ; ; - Show only errors ; ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; ; - Show all errors except for notices ; error_reporting = E_ALL & ~E_NOTICE and I ran the correct command cat | {remove comments command}, then I would end up with: error_reporting = E_ALL & ~E_NOTICE **Note** - I assumed that cat would be the best way to do this but I'm actually fine with the answer using another utility like awk, sed, egrep, etc.
cwd (46887 rep)
Dec 7, 2011, 05:21 AM • Last activity: Sep 24, 2024, 01:48 PM
7 votes
5 answers
3370 views
Cat with Headers and Line Numbers?
I have files like this $ cat trapetz x = 0:0.0001:7pi plot(x, sin(x).*cos(x)) Area = trapz(x, sin(x).*cos(x)) $ cat simpson f = inline(sin(x).*cos(x)); Area2 = quad(f, 0, 7pi, 1e-16) I want something like this $ cat -b -t MISSING? trapetz simpson traapetz 1 x = 0:0.0001:7pi 2 plot(x, sin(x).*cos(x))...
I have files like this $ cat trapetz x = 0:0.0001:7pi plot(x, sin(x).*cos(x)) Area = trapz(x, sin(x).*cos(x)) $ cat simpson f = inline(sin(x).*cos(x)); Area2 = quad(f, 0, 7pi, 1e-16) I want something like this $ cat -b -t MISSING? trapetz simpson traapetz 1 x = 0:0.0001:7pi 2 plot(x, sin(x).*cos(x)) 3 Area = trapz(x, sin(x).*cos(x)) simpson 1 f = inline(sin(x).*cos(x)); 2 Area2 = quad(f, 0, 7pi, 1e-16) or even better if some easy way to add wc there: $ find |tee |...|wc... I feel now reinventing the wheel, there must be some ready... traapetz: xyz chars 1 x = 0:0.0001:7pi 2 plot(x, sin(x).*cos(x)) 3 Area = trapz(x, sin(x).*cos(x)) simpson: zyx chars 1 f = inline(sin(x).*cos(x)); 2 Area2 = quad(f, 0, 7pi, 1e-16) but I get $ cat -b -t trapetz simpson 1 x = 0:0.0001:7pi 2 plot(x, sin(x).*cos(x)) 3 Area = trapz(x, sin(x).*cos(x)) 4 f = inline(sin(x).*cos(x)); 5 Area2 = quad(f, 0, 7pi, 1e-16) Not really cat needed but some easy tool to share and show code snippets like the above, not pastebin. I want some standard command line thing. I am trying to create easy puzzle -pasting for codegolf.se so people could reproduce things easily...
user2362
Oct 29, 2011, 01:29 AM • Last activity: Sep 17, 2024, 04:07 PM
40 votes
9 answers
58539 views
Displaying file names with contents when using the "cat" command
Is there a command to show the directory or file name when using `cat` to display the contents of files? For example: assume two files `f1.txt` and `f2.txt` are in `./tmp` ./tmp/f1.txt ./tmp/f2.txt Then when I do `cat ./tmp/*.txt`, only the content of the files will be shown. But how to first show t...
Is there a command to show the directory or file name when using cat to display the contents of files? For example: assume two files f1.txt and f2.txt are in ./tmp ./tmp/f1.txt ./tmp/f2.txt Then when I do cat ./tmp/*.txt, only the content of the files will be shown. But how to first show the file name, then the content? e.g.: (The needed command): ./tmp/f1.txt: This is from f1.txt and so on ./tmp/f2.txt: This is from f2.txt ... Is there a command to do it? (There seems to be no option for cat to show the file names.)
lukmac
Aug 28, 2012, 03:43 PM • Last activity: Sep 16, 2024, 11:11 AM
63 votes
4 answers
8263 views
Should I care about unnecessary cats?
A lot of command-line utilities can take their input either from a pipe or as a filename argument. For long shell scripts, I find starting the chain off with a `cat` makes it more readable, especially if the first command would need multi-line arguments. Compare sed s/bla/blaha/ data \ | grep blah \...
A lot of command-line utilities can take their input either from a pipe or as a filename argument. For long shell scripts, I find starting the chain off with a cat makes it more readable, especially if the first command would need multi-line arguments. Compare sed s/bla/blaha/ data \ | grep blah \ | grep -n babla and cat data \ | sed s/bla/blaha/ \ | grep blah \ | grep -n babla Is the latter method less efficient? If so, is the difference enough to care about if the script is run, say, once a second? The difference in readability is not huge.
user4518
Jul 8, 2011, 01:33 PM • Last activity: Aug 21, 2024, 09:50 AM
0 votes
1 answers
172 views
How does "Useless cat. ... or 'cmd file | ..' instead." should be applied?
I have the following line: ```bash isUbuntu=$(cat /etc/os-release | grep '^ID=ubuntu$' | wc -l) ``` It works fine Now, through VSC and mostly with the ShellCheck extension is indicated two warnings messages as follows by parts: For the latter: ``` Consider using 'grep -c' instead of 'grep|wc -l'. sh...
I have the following line:
isUbuntu=$(cat /etc/os-release | grep '^ID=ubuntu$' | wc -l)
It works fine Now, through VSC and mostly with the ShellCheck extension is indicated two warnings messages as follows by parts: For the latter:
Consider using 'grep -c' instead of 'grep|wc -l'.
shellcheck(SC2126)
Therefore the command is changed to:
isUbuntu=$(cat /etc/os-release | grep -c '^ID=ubuntu$')
and it works fine yet For the former:
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
shellcheck(SC2002)
Where it offers two suggestions to apply: * **One**: with cmd < file | .. Then if _cmd_ is the cat command then the command is changed to:
isUbuntu=$(cat < /etc/os-release | grep -c '^ID=ubuntu$')
and it works fine yet. Therefore until this point the two original messages are fixed. Now the reason of this post is about the second suggestion: * **Two**: with cmd file | .. Is it not the same cat /etc/os-release command applied from the beginning? Did I miss something? Therefore: **Question** * How to apply correctly the cmd file | .. suggestion? Pls provide an example
Manuel Jordan (2108 rep)
Aug 12, 2024, 06:27 PM • Last activity: Aug 12, 2024, 06:52 PM
2 votes
2 answers
2833 views
read line by line and execute cat with grep
Im building a script to load from a file content and then use to cat and grep in another file. The problem is that is not showing any values while executing the grep. If i do the command manually it will retrieve the data. i already use the while but the issue is the same. the output6.txt is always...
Im building a script to load from a file content and then use to cat and grep in another file. The problem is that is not showing any values while executing the grep. If i do the command manually it will retrieve the data. i already use the while but the issue is the same. the output6.txt is always empty. the echo seems to work, so it seems to be the grep or cat issue. Sample from BlockspamCLIs.txt i have the values: 4412345 441236 2367890 Sample All_events.csv file 1,441236,20220909120909,test 2,441237,20220909120909,test 3,441232,20220909120909,test 4,44136,20220909120909,test 5,2367890,20220909120909,test As an output im expecting to retrieve and store and record inside of the CSV file that contains the number for example: 1,441236,20220909120909,test 5,2367890,20220909120909,test my script: for i in cat BlockspamCLIs.txt do grep $i *_All_events.csv >> output6.txt echo $i done thank you in advance.
macieira (123 rep)
Sep 28, 2022, 08:27 AM • Last activity: Aug 7, 2024, 10:21 AM
0 votes
0 answers
135 views
Pop!_OS 22.04 "404 Not Found [IP: 108.157.60.76 80]" error while updating in terminal
When I try to do ```sudo apt update``` in pop os I get error regarding to public key. Here is the complete output: ``` Hit:1 https://dl.yarnpkg.com/debian stable InRelease Ign:2 https://releases.warp.dev/linux/deb stable InRelease Hit:3 https://releases.warp.dev/linux/deb stable Release Hit:5 https:...
When I try to do
apt update
in pop os I get error regarding to public key. Here is the complete output:
Hit:1 https://dl.yarnpkg.com/debian  stable InRelease                                                                            
Ign:2 https://releases.warp.dev/linux/deb  stable InRelease                                                                      
Hit:3 https://releases.warp.dev/linux/deb  stable Release                                                       
Hit:5 https://download.sublimetext.com  apt/stable/ InRelease                                                   
Err:5 https://download.sublimetext.com  apt/stable/ InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F57D4F59BD3DF454
Hit:6 http://apt.pop-os.org/proprietary  jammy InRelease
Hit:7 http://apt.pop-os.org/release  jammy InRelease
Get:8 http://apt.pop-os.org/ubuntu  jammy InRelease [270 kB]
Hit:9 http://apt.pop-os.org/ubuntu  jammy-security InRelease                                                                     
Hit:10 http://apt.pop-os.org/ubuntu  jammy-updates InRelease                                                                     
Hit:11 http://apt.pop-os.org/ubuntu  jammy-backports InRelease                                                                   
Ign:12 http://apt.pop-os.org/ubuntu  jammy/restricted amd64 DEP-11 Metadata                                                      
Ign:13 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 48x48 Icons                                                         
Ign:14 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64 Icons                                                         
Ign:15 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64@2 Icons                                                       
Ign:16 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 128x128 Icons                                                       
Ign:12 http://apt.pop-os.org/ubuntu  jammy/restricted amd64 DEP-11 Metadata                                                      
Ign:13 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 48x48 Icons                                                         
Ign:14 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64 Icons                                                         
Ign:15 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64@2 Icons                                                       
Ign:16 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 128x128 Icons                                                       
Ign:12 http://apt.pop-os.org/ubuntu  jammy/restricted amd64 DEP-11 Metadata                                                      
Ign:13 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 48x48 Icons                                                         
Ign:14 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64 Icons                                                         
Ign:15 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64@2 Icons                                                       
Ign:16 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 128x128 Icons                                                       
Ign:12 http://apt.pop-os.org/ubuntu  jammy/restricted amd64 DEP-11 Metadata                                                      
Err:13 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 48x48 Icons                                                         
  404  Not Found [IP: 108.157.60.76 80]
Ign:14 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64 Icons                                                         
Ign:15 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 64x64@2 Icons                                                       
Ign:16 http://apt.pop-os.org/ubuntu  jammy/restricted DEP-11 128x128 Icons                                                       
Ign:12 http://apt.pop-os.org/ubuntu  jammy/restricted amd64 DEP-11 Metadata                                                      
Fetched 270 kB in 23s (11.7 kB/s)                                                                                               
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://download.sublimetext.com  apt/stable/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F57D4F59BD3DF454
W: Failed to fetch https://download.sublimetext.com/apt/stable/InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F57D4F59BD3DF454
E: Failed to fetch http://apt.pop-os.org/ubuntu/dists/jammy/restricted/dep11/icons-48x48.tar   404  Not Found [IP: 108.157.60.76 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
When I want to see
/etc/apt/sources.list
file the output says:
This file is deprecated in Pop!_OS.
See man deb822 and /etc/apt/sources.list.d/system.sources.
And the output of
/etc/apt/sources.list.d/system.sources
file is
X-Repolib-Name: Pop_OS System Sources
Enabled: yes
Types: deb deb-src
URIs: http://apt.pop-os.org/ubuntu/ 
Suites: jammy jammy-security jammy-updates jammy-backports
Components: main restricted universe multiverse
X-Repolib-Default-Mirror: http://apt.pop-os.org/ubuntu 
X-Repolib-ID: system
I can provide additional informations if you like. Cheers
Mustafa Sakalli (1 rep)
Aug 2, 2024, 10:45 AM
25 votes
3 answers
5570 views
Is it still unsafe to cat an arbitrary file?
I read [this][1] post today and the answers claimed that certain escape sequences could be dangerous in some terminals, [this][2] post also has people saying that it can even be unsafe to simply view log files. Note the word "view" there, ever since I started using GNU/Linux I've always thought of c...
I read this post today and the answers claimed that certain escape sequences could be dangerous in some terminals, this post also has people saying that it can even be unsafe to simply view log files. Note the word "view" there, ever since I started using GNU/Linux I've always thought of cat as a way to view text files, but the more I read about it, the more I see that cat shouldn't be used for that at all. My questions are: are these answers still true today? Have there been many patches to secure terminals? Should I be afraid of running applications over an ssh connection because they can infect the terminal I'm viewing them on?
user9503 (379 rep)
Jul 27, 2024, 10:07 PM • Last activity: Jul 30, 2024, 07:16 AM
0 votes
1 answers
44 views
view a bunch of text files in the terminal
I've got a bunch of text files and pdfs in a directory. If I enter evince *.pdf ..all the pdfs open up in separate windows, I do this quite often. When I enter cat *.txt ..was pleasantly surprised to see it shows all the text files in the terminal. Problem is it has them all just laid end to end you...
I've got a bunch of text files and pdfs in a directory. If I enter evince *.pdf ..all the pdfs open up in separate windows, I do this quite often. When I enter cat *.txt ..was pleasantly surprised to see it shows all the text files in the terminal. Problem is it has them all just laid end to end you can't really tell where one ends and the next one begins or which one you're looking at as you scroll. Is there an improvement to this cat command whereby it will give the name of the file in the terminal before dumping its contents? That's the main point, but perhaps a line or blank space after the text file ended so you would know it had ended would also be nice to have. Otherwise, a better terminal command than cat which accomplishes this.
cardamom (662 rep)
Jul 3, 2024, 12:54 PM • Last activity: Jul 3, 2024, 01:04 PM
Showing page 1 of 20 total questions