Bash Before RHCSA?

JacktivatedJacktivated Member Posts: 39 ■■□□□□□□□□
Hi Everybody,

I am considering going for the RHCSA certification next and wondering if I should learn Bash first?

I have no prior programming/scripting experience at all. I have been a mild Linux user off and on over the years, mostly at home, and have done some things at work mainly with CentOS, including installing, configuring, settting up and maintaining Nagios core, and I'm comfortable using Vi/Vim.

I also plan to learn Python at some point, as well, but from what I've read on the forums, most believe it would be more beneficial to learn Bash prior to Python. I'm just wondering if Bash should precede the RHCSA.

Thanks very much, in advance.

Comments

  • gkcagkca Member Posts: 243 ■■■□□□□□□□
    Check the test objectives here https://www.redhat.com/en/services/training/ex200-red-hat-certified-system-administrator-rhcsa-exam - that's what you will be tested on. And it means that you need a basic familiarity with Bash, but no scripting, that would be a part of RHCE exam https://www.redhat.com/en/services/training/ex300-red-hat-certified-engineer-rhce-exam
    "I needed a password with eight characters so I picked Snow White and the Seven Dwarves." (c) Nick Helm
  • JacktivatedJacktivated Member Posts: 39 ■■□□□□□□□□
    gkca wrote: »
    Check the test objectives here https://www.redhat.com/en/services/training/ex200-red-hat-certified-system-administrator-rhcsa-exam - that's what you will be tested on. And it means that you need a basic familiarity with Bash, but no scripting, that would be a part of RHCE exam https://www.redhat.com/en/services/training/ex300-red-hat-certified-engineer-rhce-exam

    Thanks. GKCA.

    The scripting is more of a personal choice as I'm planning to go for the AWS Certified Solutions Architect certification later.
  • gkcagkca Member Posts: 243 ■■■□□□□□□□
    Here's one of the best and free resources to get a good grip of bash: The Linux Command Line by William E. Shotts, Jr.
    "I needed a password with eight characters so I picked Snow White and the Seven Dwarves." (c) Nick Helm
  • JacktivatedJacktivated Member Posts: 39 ■■□□□□□□□□
    gkca wrote: »
    Here's one of the best and free resources to get a good grip of bash: The Linux Command Line by William E. Shotts, Jr.

    Thanks for the book recommendation.

    So, given my situation, would you say that I should learn Bash before going through the RHCSA material, or should I save it for after? Also, in your opinion, should Bash come before Python?

    Regards,
    Jack
  • VeritiesVerities Member Posts: 1,162
    Thanks for the book recommendation.

    So, given my situation, would you say that I should learn Bash before going through the RHCSA material, or should I save it for after? Also, in your opinion, should Bash come before Python?

    Regards,
    Jack

    You need to understand the file system layout and how to navigate the CLI, before you try to learn scripting. Keep in mind BASH is a shell and BASH scripting is chaining commands together. You can add logic the scripts to make decisions based on certain values or other means (if a file exists, do x, etc).

    In my opinion you should learn BASH first and later on try out Python.
  • JacktivatedJacktivated Member Posts: 39 ■■□□□□□□□□
    Verities wrote: »
    You need to understand the file system layout and how to navigate the CLI, before you try to learn scripting. Keep in mind BASH is a shell and BASH scripting is chaining commands together. You can add logic the scripts to make decisions based on certain values or other means (if a file exists, do x, etc).

    In my opinion you should learn BASH first and later on try out Python.

    Thanks for that insight, Verities.

    Please excuse my confusion. Sometimes things aren't so clear on the receiving end of a conversation the first time around and I just wanted to confirm what you meant.

    Which scenario below closely matches what you're saying?

    (#1) Learn the BASH shell, itself, prior to learning Linux and then, after obtaining the RHCSA, learn BASH scripting, followed by Python? As in, the scripting can come later. Just focus on Linux.

    (#2) I should just go for the RHCSA and, afterward, start learning BASH along with BASH scripting, followed by Python?
  • hiddenknight821hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□
    I believe what @Verities meant was that you should learn bash scripting before you start working toward python regardless if you decide to learn bash before or after you get the RHCSA.

    Learning the BASH shell is pretty much learning how to work the command line. There is really no difference between running the command interactively in a shell or placing the commands in an executable file. The basic of bash scripting will come to you naturally once you immerse yourself into Linux as it's really inevitable. It's like picking up some French when you're living in France for a year, and there's no way around it. You'd see several bash script examples when you learn about cronjob. There is no best time to learn bash. However, if you are genuinely interesting in learning bash scripting now, then I'd urge you to learn it before you lose motivation.
  • Node ManNode Man Member Posts: 668 ■■■□□□□□□□
    I'm a little fuzzy on the necessity of Bash. Perhaps its a job by job thing. I live in Linux and consider myself a pretty solid Python programmer, and I barely do anything with Bash. I spend a lot of time with the telnet lib and snmpget.
  • asummersasummers Member Posts: 157
    You don't need to learn BASH scripting, and you will learn BASH itself whilst learning the topics for the RHCSA exam.
    I certainly wouldn't start learning things like python first.
  • VeritiesVerities Member Posts: 1,162
    @jacktivated: Hiddenknight explained what I was trying to get across.

    @nodeman: Lots of jobs still want you to know BASH. BASH scripts are still heavily used and having a solid base with it would be beneficial before moving into Python. I think the main reasoning for that is that Python can have BASH nested within it. However, I'm under the impression that CM tools like Ansible are removing the need for BASH scripts unless they're bundled with an application.
  • asummersasummers Member Posts: 157
    Verities wrote: »
    @jacktivated: Hiddenknight explained what I was trying to get across.

    @nodeman: Lots of jobs still want you to know BASH. BASH scripts are still heavily used and having a solid base with it would be beneficial before moving into Python. I think the main reasoning for that is that Python can have BASH nested within it. However, I'm under the impression that CM tools like Ansible are removing the need for BASH scripts unless they're bundled with an application.

    I have had roles where all I did was create and maintain BASH scripts, and it has proven it's worth more than any training or certification ... but, I strongly think people should just play with Linux before trying to BASH scripted as it lacks context. It's good to hit a problem and have to create a solution via a script and I thnk that's more useful than some of the bash courses I have seen.
  • VeritiesVerities Member Posts: 1,162
    asummers wrote: »
    I have had roles where all I did was create and maintain BASH scripts, and it has proven it's worth more than any training or certification ... but, I strongly think people should just play with Linux before trying to BASH scripted as it lacks context. It's good to hit a problem and have to create a solution via a script and I thnk that's more useful than some of the bash courses I have seen.

    I agree that BASH scripting is valuable and like I said its used still in a lot of jobs (I can attest to almost every Linux job interview I've had they ask me if I know BASH scripting), but its becoming an obsolete solution. You prove this point by saying you have had roles where all you did was maintain and create BASH scripts. Script maintenance along with lack of documentation or pseudocode are the main detractors of BASH. If you take your BASH scripts and convert them into Ansible Playbooks, not only are they more readable, but you can easily maintain them by having a central repository, then running the playbooks against a large number of servers in less than a few minutes. This alleviates having to maintain BASH scripts on many servers that have to constantly be updated.
Sign In or Register to comment.