So much scripts - so little manual bits

Hi all, gentleman… I’m back and hope it’s sunshine and cold ones on ice… so… I’m curious, as someone that really enjoys the hands on approach of doing just about anything on my system… what’s with all the script-ing going on? I see script this, script that… now, I’m not saying it can’t have its uses… but… it’s seemingly taking the best parts of of everything… and on some occasions I see it does pretty 90% of what is more than capable by the user… why the rush to script away?

I’m not sure what you’re referring to in particular, but as a general rule, if there’s something tedious I could automate with a script, why would I bother doing the work manually?


its both for me fun while learning and indeed automation is the key for making machines do what you want and take the workload away from your fingertips.


Hey Celty, but so you would rather automate over the rather exciting and intriguing part of learning how to explore the system… I thought that’s why Linux was so sought after, its usability and taking control? Just curious… but like each to their own… Just don’t understand all the hype hahahah

Joe, howsit… I myself have made one or two… and they had only replay that initial most momentous moment and I can’t say I’ve needed it again… okay, if we went further say… you had it setup like a Cronie (I stand corrected, as I’ve not used that or tried) where it runs at certain times or over a certain stipulated time frame on the regular… that I can see as serving a very useful purpose? Or am I way off ha

Well it depends what you’re referring to. If you provide an example I’ll let you know if I rather have it automated or not.

Could you give some examples? What do you notice being done with scripts that you think would be better, faster, more efficient or more fun if done manually?

Because it’s not really clear to me what you’re talking about.

I can think of one half-example: package management on Arch Linux should never be done automatically because user intervention is necessary, but I don’t really see anyone trying to automate it (at least I do not see any serious attempts).


Hmm… faster, is not always better? Can you agree? I could give this as a good example… now remember, I’m purely just doing a info find on why scripts so heavily seems to be the go to answer, amongst the a good few… which often comes across as “rushed” and then something goes wrong or an issue arises and the user genuinely doesn’t know what is up from down hahaha… but they can script, or make scripts… today I made a big mistake… and tried to optimise my cFlags etc for when I do the Kernel thing… I spent a good 4 hours running over my notes since I started with Linux but without a single forum lucky I came right… I messed my makepkg.conf up Bad… and wasn’t impressed

Luckily I managed to sort it out and retraced my steps and all that jazz. It looked bad… I couldn’t do anything when the errors jumped into picture :unamused:

It’s always a good idea to make a backup copy of a file before making changes to it. Especially configuration files.


What ever are we talking about? I don’t understand a thing said. :thinking:


Yes, hence I had written “or” instead of “and”.

Any example of just one of these would suffice (it is not necessary that all are true), but you have not provided anything that I could understand.

1 Like

Come on… fun is always better… but okay, you’ve made a decent debate… I felt maybe Everyone knew something I didn’t and seemed I was missing out… but the more I read into scripts and their uses… my feed was fed with constant script did this to my system etc… so, I needed to get a more experienced opinion from the more experienced:D.
kresmir, one last thing if you please… Linux from scratch… you have any knowledge on that? I’m considering going for a complete floor to ceiling challenge… would it be beneficial? Or is there similar and more hands on?

Sorry I haven’t replied to all, I will… we just having issues well… my Samsung is

I haven’t yet attempted it. Saving it for retirement or a longer sick leave.

1 Like

Shouldn’t this be moved to #lounge?

The great thing about the scripts and automation in EOS is that it is all optional. They are helpful tools for those who want to use them and they don’t get in your way if you prefer a more hands on approach.

The other thing about scripts, is that the ‘best’ ones are often written for you by you… you have to learn enough about the subject to make the script work! After it is has been learned, why not make it easy to reuse?

An example… I know how to get a list of impending updates (checkupdates) and AUR updates (yay -Qua) - so why not automate and enhance the presentation? (see bash function upls below)? Or have the system report the counts from the same thing if that’s all you need? (upcnt) - as well a many others as we go along.

I think if you generally only use scripts that you pretty much understand what they are doing, there will be no harm!

# Function to list available updates

upls() {
# create vars

# count AUR updates
NEWAUR=`yay -Qua | wc -l`

# run checkupdatesext to create file in /tmp
declare -r tempfile="$(mktemp -t my_temp_file-XXXXXX.txt)"

checkupdatesext > "$tempfile"
if [[ ${NEWAUR} > 0 ]]; then
		echo " " >> "$tempfile"
		echo "AUR Packages" >> "$tempfile"
		echo "------------" >> "$tempfile"
		yay -Qua | column -t -N Name,Current,"->",New >> "$tempfile"

# output RESULT
if [[ -s "$tempfile" ]]; then
	cat "$tempfile"
	rm -f "$tempfile"
	echo "No pending updates..."
# Function to count available updates

upcnt() {
# create vars

# count AUR and pacman updates
NEWAUR=`yay -Qua | wc -l`
NEWPKG=`checkupdates | wc -l`

# output RESULT
if [[ ${NEWPKG} == 0 && ${NEWAUR} == 0 ]]; then
	RESULT="System up-to-date"
	RESULT=$NEWPKG" Repo pkgs + "$NEWAUR" AUR pkgs need updating"
echo $RESULT

If you add these in your ~/.bashrc, you save yourself some time - and maybe you can make them better too. Scripts have their uses…:grin:

1 Like

almost 20 replies in I am still as confused.


Please provide example. I don’t feel that my system is overflowing with unnecessary (bash) scripts.

On the other hand I create a script when I expect I will do some task repeatedly (more than once) and it doesn’t require human interaction (e.g. convert videos in a directory with the same set of parameters).
When I do not run a script is when I need some interaction with the computer - e.g. debugging a problem, looking for it in logs, setting up a service for the first time.

When I use “other peoples” scripts? When I want to setup something unknown to me and I am certain that other person did necesary research before me and the script works. There is always a question how much time, effort, trust,… I am willing to invest. That is also why I use this great instalation “script” for EndeavourOS instead of The Arch Way™ because I do not see enough benefit to do the later.

You sound like it is a bad thing that stuff can get automated. That’s kind of reason why we have computers. :wink:
You do not have to waste your time writing the same things again and again. Worry about typographical errors or trying to remember correct syntax.