Sources to learn basic shell scripting commands?

My job uses Unix and I’m currently self training from home due to current events. I’ve tried lex trainings and YouTube tutorials to no avail. What would you suggest someone who is horrible at programming use to learn basic shell scripting commands in Unix?

I always like to learn new things by working with the “new tech” in real projects.

@Neo could you explain what you mean by "new tech" ? is it a category on this community. Or you literally mean tech folks on teams?

Hi @erroruploading

Sorry not to be more clear.

I mean current technologies. For example, I am now working with Discourse and learning Ruby and Rails by actually doing "real work" on the site; putting theory into practice.

Normally, I read or watch tutorials and then I put into practice what I am learning with real, hands-on-keyboard, practical examples in a project I am currently working on.

Hope this helps.

got it, thanks for your explanation.

I think I can summarize, "Learn by doing".

If you want to learn how to write basic shell scripts, pick some sys admin tasks you want to perform and write shell scripts to do them.

For example, at the moment I am learning Ruby on Rails by alternating between watching YT tutorials and sitting down at the keyboard and writing small Ruby plugins for Discourse.

Slowly, I am becoming good at it, by doing small tasks and working my way up to larger projects :slight_smile:

1 Like

You took the words off my tongue Neo, I was trying hard to summarise my thoughts on the subject like you based on my experience : Learning or trying to without a goal or a good idea of what you are doing it for (It has to be very useful and used in every day/ current work ) otherwise your current work ( if of no use) will slowly takeover and with time you will have all forgotten, if I look what I learned ( was master in Cobol, a developper on mainframe (GCOS), a developper on UNIX mostly oracle, was a DBA, was a Novel admin), I don't know anymore Pascal, can't code in Cobol but still I can debug, can only debug SQL, but have a little idea on RDBMS issues and so be of some help in tuning or solving performance issues, and in UNIX? well the same I learned a lot, in the 90s even kernel level ( troubleshooting drivers ) but was hopeless in C ( as never coded, no reasons...) but could debug or assist a C programmer in debugging and on the Hundreds (yes not like DOS where if you could name 20 commands on the shot you were a Guru ( I was, using that definition haha...)) You retain what you use most and its amazing how versatile some commands can be... But as you have learned once in the time... the less used commands you remember their names and some usage and you use the man pages when you are in need...
Once at this stage, the SHELL has no more secrets for you...
Then its more what are you to do with what you know? a developper will have language extensions like mastering Java, python, perl and maybe C++, sed and awk if shell scripting is the main duty, and if you are in system admin, then it all the admin tasks commands which differ depending on the flavour, but tasks are the same.. and mastering the UNIX behaviour... You must be good at unix, but not necessarily a guru in shell scripting as many tasks you do are not repetitive, e.g. tuning can not be automated... You need to know shell scripting because you will have many to read to understand what is wrong...
So back to Neo's point of vue, without a clear idea what its for and will it be used every day, if not strongly motivated, you will find no pleasure in trying to learn

1 Like

Thanks @vbe

Sometimes I am at a loss of why people do not create and post projects of interest, to be frank.

I rarely learn any programming language or method unless I am using it in a practical application.

Recently, I learned Docker (fairly well) because I now use Docker every day for this site. In the past few months, I have learned Docker, Ember, Ruby, Rails, Sidekiq, Redis and Unicorn; each to different degrees of capability. My new Docker and Ruby skills are OK. I manage with Sidekiq, Redis and Unicorn. Still struggling with Ember but slowly Rails is coming along.

My wife was telling me the other day "I wish I could watch YT videos on technology like you and remember all you watched!"; and I replies "Haha, I don't remember much of anything unless I sit down at the keyboard and work on a project using what I have learned." She was like "Really???", she actually thought when I read books and watch videos and memorized it all.

Then I told her, "You can be just like me if you just apply what you learn on your FB news feed and TV shows to tasks and projects and do them, whatever you are motivated to do." Lucky for me, she then made some delicious "new recipe" pasta that night!

:slight_smile:
So funny....

1 Like