Announcement
Collapse
No announcement yet.
Numerous linux hangovers?
Collapse
This topic is closed.
X
X
-
Windows no longer obstruct my view.
Using Kubuntu Linux since March 23, 2007.
"It is a capital mistake to theorize before one has data." - Sherlock Holmes
- Top
- Bottom
-
I have "apt list --installed | grep -i" aliased to "apli" and soworks for me.Code:apli linux-image
Kubuntu 20.04
- Top
- Bottom
Comment
-
@kubicle, I have yet another question about your script!
Since I don't have any "rc" files left, I'm usinginstead ofCode:PCKGS=$(COLUMNS=200 dpkg -l | grep breeze | tr -s ' ' | cut -d ' ' -f 2)
to ask my question.Code:PCKGS=$(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2)
First, I runI open ~/Desktop/breeze.txt in vim. Each line ends with a pilcrow (?) and there's no space immediately before the pilcrow as seen in the image:Code:COLUMNS=200 dpkg -l | grep breeze | tr -s ' ' | cut -d ' ' -f 2 > ~/Desktop/breeze.txt
Now, I runand follow that withCode:PCKGS=$(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2)
which gives me:Code:echo ${PCKGS}The question: how do spaces appear between the package names? What does "echo ${PCKGS}" do to convert the "one package name per line" (as seen in the image) to the single line output with package names separated by spaces?Code:breeze breeze-cursor-theme breeze-gtk-theme breeze-icon-theme kde-style-breeze kwin-style-breeze libreoffice-style-breeze sddm-theme-breeze
Kubuntu 20.04
- Top
- Bottom
Comment
-
If you wish to preserve control chars, you'd put the variable in double quotes, otherwise they are replaced by spaces.Originally posted by chimak111 View PostThe question: how do spaces appear between the package names? What does "echo ${PCKGS}" do to convert the "one package name per line" (as seen in the image) to the single line output with package names separated by spaces?
echo "${PCKGS}" vs. echo ${PCKGS}
- Top
- Bottom
Comment
-
Okay, thanks! So many intricaciesOriginally posted by kubicle View PostIf you wish to preserve control chars, you'd put the variable in double quotes, otherwise they are replaced by spaces.
echo "${PCKGS}" vs. echo ${PCKGS}
Kubuntu 20.04
- Top
- Bottom
Comment
-
Taking that question mark as implying a question, your .vimrc (or some other rc file) includes something likeOriginally posted by chimak111;445046...Each line ends with a pilcrow (?) ...
to make visible the line numbers and the ends of lines.Code:set nu list lcs=eol:?
Regards, John Little
- Top
- Bottom
Comment
-
Thanks!Originally posted by jlittle View PostTaking that question mark as implying a question, your .vimrc (or some other rc file) includes something like
to make visible the line numbers and the ends of lines.Code:set nu list lcs=eol:?
I havein my .vimrc. My sticking the "?" in the earlier post was because I wasn't sure whether the ? was an end-of-line or carriage return or "\n". I'm don't know how/whether those differ and are to be termed.Code:set list listchars=tab:→\ ,nbsp:␣,eol:?
Kubuntu 20.04
- Top
- Bottom
Comment
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.








Comment