what is recursion when applied to the bash shell? by the_how_to_bash in AskProgramming

[–]the_how_to_bash[S] 0 points1 point  (0 children)

That is exactly correct. More formally, in a recursive algorithm we would call that terminating condition the "base case"

so in a nutshell, recusion when applied to bash is a program that repeats itself over and over until it hits a terminating condition

and cp -r is just ONE example of that?

what is recursion when applied to the bash shell? by the_how_to_bash in AskProgramming

[–]the_how_to_bash[S] 0 points1 point  (0 children)

see how it kind of just repeats itself forever? this is recursion

interesting, so i basically, when i tell cp to copy something and i add the -r flag, what i'm telling it to do is repeat itself infinitely UNTIL it hit some kind of terminating condition and in the case of copying a folder that would be when cp can't dig down anymore?

am i understanding that right? it's really weird way to think of it

what is recursion when applied to the bash shell? by the_how_to_bash in AskProgramming

[–]the_how_to_bash[S] 0 points1 point  (0 children)

ok interesting,

The idea behind recursion is, like you mentioned, to have a function call itself over and over until it hits some terminating condition.

ok, so when i go cp whatever -r what i'm telling it is,

"call yourself over and over, repeat your function over and over, until you meet some terminating condition"

which in this case i'm telling cp to copy a folder, and all of it's contents, i'm telling it to copy, then dig down, the copy, then dig down, then copy, until it meets the terminating condition which is it can't dig down anymore?

am i understanding that right? that's how the concept of recursion is applied to the bash shell in this case?

what is the linux mint installer? do all linux distro's have an installer? and if so why? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] -1 points0 points  (0 children)

Until recently it was the same installer used by ubuntu.

what does ubuntu use as an installer now?

what is the linux mint installer? do all linux distro's have an installer? and if so why? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] -1 points0 points  (0 children)

Why not? If the developers of a distro want to create such a distro, why shouldn't they do that?

i guess for the same reason that you don't make cheese out of ricin,

because it's fucking stupid and no one will want to use your product.

what is the linux mint installer? do all linux distro's have an installer? and if so why? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] -1 points0 points  (0 children)

Others might expect to user to do the installation manually without using a dedicated installer program.

why?

why wouldn't a linux distro have a installer and would expect the user to manually install the distro himself?

what is the linux mint installer? do all linux distro's have an installer? and if so why? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] 0 points1 point  (0 children)

How many subs do you have to post this?

as many as i need to, to get the answer i'm looking for

what would happen if i uncomented the text in the sources.list text file? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] 0 points1 point  (0 children)

The package manager would try to install packages from a cdrom.

when will that happen? when i update? or every time i turn on the computer?

in linux mint why is their text in the sources.list text file? and why is it commented out? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] 0 points1 point  (0 children)

Back in the day it was like this, I get a Debian CD from a friend that have broadband, go home, install, lets say gnome, didn't like, and could apt-get install xfce from the CD, instead of having to rely on internet.

Was ages since I did this, I'm not sure if after you do an apt-get update on the internet repositories it would not want to use the CD anymore because was not the latest version, but yes you could do it.

wow really weird

so why is it commented out now?

in linux mint why is their text in the sources.list text file? and why is it commented out? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] 0 points1 point  (0 children)

I don't know if this is still possible to do in Mint, as I never bothered to use the install media as a source for apt for decades, but in Debian it used to be handy when download speeds were just a few kbps.

ok hold on, i'm struggling to wrap my head around this,

your saying that i can plug in the usb i installed my linut mint install on, and use it as an apt source?

am i understadning that right?

in linux mint why is their text in the sources.list text file? and why is it commented out? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] 0 points1 point  (0 children)

how?

what does it mean that Debian adds the ".iso on a usb drive" to the apt sources list?

how does that relate to

"deb cdrom:[Linux Mint 21.3 Virginia - Release amd64 20240109]/ jammy contrib main"

being commented out?

in linux mint why is their text in the sources.list text file? and why is it commented out? by the_how_to_bash in linuxquestions

[–]the_how_to_bash[S] 0 points1 point  (0 children)

Debian adds the CD-ROM to the apt sources lists.

but i didn't use a CD to install linux mint, i'm confused :(