[SOLVED] Terminal 'cutting' text results

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

[SOLVED] Terminal 'cutting' text results

Post by django0212 »

Lets say I type something in the terminal like this:

Code: Select all

apt search mp3
Now the results are sometimes getting cut where the window ends. So one of the results are something like this:

Code: Select all

p   libmp3-info-perl                                - Perl MP3::Info - Manipulate / fetch info from MP3 audio fi
As you can see, the sentence got 'cut' at the end. How can I fix this. I also don't see a option such as 'Toggle Word Wrap', which would continue the sentence in a new line instead of one continuous line.
Last edited by django0212 on Sun Nov 15, 2020 10:42 am, edited 2 times in total.
User avatar
Larry78723
Level 9
Level 9
Posts: 2976
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Terminal 'cutting' text results

Post by Larry78723 »

What version of LM and desktop are you using? Which terminal? Is the terminal opened to full screen?
Last edited by Larry78723 on Thu Oct 22, 2020 10:18 am, edited 1 time in total.
Image
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

Larry78723 wrote:
Thu Oct 22, 2020 10:10 am
What version of LM and desktop are you using? Which terminal?
I'm using LM 20 XFCE. I don't know if that's what the terminal is called but I went to the 'About' option and it showed 'xfce4-terminal'.
User avatar
Larry78723
Level 9
Level 9
Posts: 2976
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Terminal 'cutting' text results

Post by Larry78723 »

When you got that result, was your terminal opened to full screen width?
Image
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

Larry78723 wrote:
Thu Oct 22, 2020 10:21 am
When you got that result, was your terminal opened to full screen width?
If by full screen width you mean maximised, then yes. I have also tried the 'Fullscreen' option in the 'View' tab. That also hasn't worked.
User avatar
Larry78723
Level 9
Level 9
Posts: 2976
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Terminal 'cutting' text results

Post by Larry78723 »

I don't know of any terminal that does wrapping of lines so I don't know what to tell you. You could do something like this:

Code: Select all

apt search mp3 > mp3.txt
That would give you a text file named mp3.txt in your /home folder that should have the complete text.
Image
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

Larry78723 wrote:
Thu Oct 22, 2020 10:43 am
I don't know of any terminal that does wrapping of lines so I don't know what to tell you. You could do something like this:

Code: Select all

apt search mp3 > mp3.txt
That would give you a text file named mp3.txt in your /home folder that should have the complete text.
I have tried doing that. However, the results aren't any different.
User avatar
Larry78723
Level 9
Level 9
Posts: 2976
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Terminal 'cutting' text results

Post by Larry78723 »

Sorry, I can't help you further.
Image
mikeflan
Level 2
Level 2
Posts: 93
Joined: Sun Apr 26, 2020 9:28 am

Re: Terminal 'cutting' text results

Post by mikeflan »

Regarding:
I don't know of any terminal that does wrapping of lines
I'm thinking you meant to say "I don't know of any terminal that does NOT do wrapping of lines".

If not, GNOME 3.28.1 wraps lines, and I don't see any way to turn it off. Not that I would want to turn it off.


Regarding:
I have tried doing that. However, the results aren't any different.
Are you saying you used a command like this:
apt search mp3 > mp3.txt
and created a text file where you cannot scroll to the right and see all the output?
That makes no sense to me. Can you supply that mp3.txt file so we can see what you are talking about?
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

mikeflan wrote:
Thu Oct 22, 2020 3:06 pm
Regarding:
I have tried doing that. However, the results aren't any different.
Are you saying you used a command like this:
apt search mp3 > mp3.txt
and created a text file where you cannot scroll to the right and see all the output?
That makes no sense to me. Can you supply that mp3.txt file so we can see what you are talking about?
When I type that command in a maximised window, the resulting txt is this: https://drive.google.com/file/d/1SRtC7i ... sp=sharing.

When I type that command in a restored down window, the resulting txt is this: https://drive.google.com/file/d/1fKMXqR ... sp=sharing
User avatar
Flemur
Level 18
Level 18
Posts: 8817
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Terminal 'cutting' text results

Post by Flemur »

django0212 wrote:
Fri Oct 23, 2020 6:38 am
apt search mp3 > mp3.txt
That command returns color codes which might be causing problems (don't see why, though, but your problem is strange) - what happens if you create a text file (with some text editor) with really long lines (> 132 characters) and then

Code: Select all

cat file.txt
?
You might try a different terminal - lxterminal and mate-terminal are similar to xfce4-terminal, or something like terminator probably has a different code base.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

Flemur wrote:
Fri Oct 23, 2020 9:20 am
what happens if you create a text file (with some text editor) with really long lines (> 132 characters) and then

Code: Select all

cat file.txt
?
It opens the file in a text editor
User avatar
Flemur
Level 18
Level 18
Posts: 8817
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Terminal 'cutting' text results

Post by Flemur »

django0212 wrote:
Fri Oct 30, 2020 6:51 am
Flemur wrote:
Fri Oct 23, 2020 9:20 am
what happens if you create a text file (with some text editor) with really long lines (> 132 characters) and then

Code: Select all

cat file.txt
?
It opens the file in a text editor
If you create a text file (with some text editor) with really long lines (> 132 characters) and then enter

Code: Select all

cat file.txt
in a terminal, it doesn't open anything with a text editor; it writes the content of file.txt to the terminal.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

Flemur wrote:
Fri Oct 30, 2020 8:17 am
django0212 wrote:
Fri Oct 30, 2020 6:51 am
Flemur wrote:
Fri Oct 23, 2020 9:20 am
what happens if you create a text file (with some text editor) with really long lines (> 132 characters) and then

Code: Select all

cat file.txt
?
It opens the file in a text editor
If you create a text file (with some text editor) with really long lines (> 132 characters) and then enter

Code: Select all

cat file.txt
in a terminal, it doesn't open anything with a text editor; it writes the content of file.txt to the terminal.
My bad. I did not open the terminal where the text file was located so I had to enter the entire "directory address" of the file. I think that's why the text editor opened. When I did it correctly the terminal showed the whole text properly. I think the terminal doesn't show the whole text only when I do something with "apt search". Why might it be so?
User avatar
Flemur
Level 18
Level 18
Posts: 8817
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Terminal 'cutting' text results

Post by Flemur »

django0212 wrote:
Fri Oct 30, 2020 9:11 am
I think the terminal doesn't show the whole text only when I do something with "apt search". Why might it be so?
As I mentioned above, it could be the color codes or other formatting characters in the output of the apt command. Try a different terminal!
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
django0212
Level 1
Level 1
Posts: 13
Joined: Thu Oct 08, 2020 1:24 am

Re: Terminal 'cutting' text results

Post by django0212 »

Flemur wrote:
Fri Oct 30, 2020 9:27 am
django0212 wrote:
Fri Oct 30, 2020 9:11 am
I think the terminal doesn't show the whole text only when I do something with "apt search". Why might it be so?
As I mentioned above, it could be the color codes or other formatting characters in the output of the apt command. Try a different terminal!
Ok thanks
User avatar
Flemur
Level 18
Level 18
Posts: 8817
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Terminal 'cutting' text results

Post by Flemur »

django0212 wrote:
Sat Oct 31, 2020 8:27 am
Ok thanks
You could also try this (it removes the color codes):

Code: Select all

apt search mp3 > somefile
cat somefile
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Post Reply

Return to “Software & Applications”