I bet they'd invent a great language for smells.

Does it make sense to learn bash?

I use bash scripts simply as a sequence of system calls (cd, make, curl, unzip, copy). If I need logic, I use perl.

Does it make sense to learn more?
Permalink Io 
March 16th, 2017 1:34pm
Which platform?
Permalink President of WildRiver fan club 
March 16th, 2017 1:35pm
Linux.
Permalink Io 
March 16th, 2017 1:36pm
More specifically, Ubuntu (debian). Serves me well on Mac too it seems.
Permalink Io 
March 16th, 2017 1:37pm
Just thought about it, gotta verify tomorrow if there's crontab on Mac.
Permalink Io 
March 16th, 2017 1:38pm
If you are working as a Linux admin or intend to get that type of a job, you need to know both.  You can run into either but I would say that Perl in still more dominant.
Permalink ps 
March 16th, 2017 1:38pm
I never understand why people write bash scripts, one liners are OK but as soon as you create a script file you might as well use a proper programming language.
Permalink Ducknald Don 
March 16th, 2017 3:14pm
Fuck yes you should learn bash. Any decent IT professional should know lowest common denominator command line tools. If you don't master a Linux command line script tool we will definitely ridicule you. Next question.

> but as soon as you create a script file you might as well use a proper programming language.

Somewhat agreed but every language, even the leanest non compiled ones like Python and PHP have layers of cruft to wade through in order to understand enough to write something functional.
Permalink Bored Bystander 
March 16th, 2017 4:42pm
(by "cruft" associated with languages, I mean like understanding what variables mean and how they're implicitly declared, knowing the magical include files or libraries to pull in, etc. I never learn this garbage in my work - I just Google and scavenge sample programs which I mold to my purpose.)
Permalink Bored Bystander 
March 16th, 2017 4:43pm
You should know bash.  But once you know a little, you should be able to Internet search for any problem.
Permalink FSK 
March 16th, 2017 8:05pm
Perl is an infinitely superior shell replacement.

Its syntax is MUCH more regular.  Things it does are MUCH more predictable.  Running it under a debugger is a joy.

bash has all these stupid ways of doing things -- define a variable with 'set', but if you want the setting to 'take' you use 'export'.  'if' statements have a RIGID spacing convention that you MUST NOT violate.

And with Perl, you can set it up so things don't fail silently.  With bash, things fail silently all the time.

So learn just enough bash to set env vars with it, and start your Perl scripts.
Permalink SaveTheHubble 
March 16th, 2017 11:07pm
Not really.  People can write large, sophisticated, useful bash scripts but it takes enormous self-discipline to do that and also to prevent them from turning into disgusting hot messes.

Write programs in good languages, save bash scripts for basic environment setup that needs easy tweaking.
Permalink Wabi-sabi 
March 16th, 2017 11:43pm
Perl doesn't qualify as a good language, btw.  Some companies ban them for the same reasons.
Permalink Wabi-sabi 
March 16th, 2017 11:46pm

This topic is archived. No further replies will be accepted.

Other topics: March, 2017 Other topics: March, 2017 Recent topics Recent topics