Is anyone still writing full blown bash applications or is it not cool anymore and I should switch to 100% python?

Is anyone still writing full blown bash applications or is it not cool anymore and I should switch to 100% python?

Other urls found in this thread:

pastebin.com/cmuRfFfW
github.com/ErisBlastar/cplusequality
bugs.freebsd.org/bugzilla/show_bug.cgi?id=155385
twitter.com/SFWRedditImages

The downside of relying on python will be the eventual breakage sooner rather than later. Updates in python, updates in api's of libraries, deprecation of packages, etc.

The benefit (main) of pure bash is stability and portability.

Nah, they still fuck up some advanced freatures between releases.
Native 2D arrays in bash when?

I use bash over python whenever given the option.
Go for python when it needs ability that you cannot automate easily with bash.
you will be better off in the long run using bash over python.

Python tends to work on windows. On the other hard I haven't used windows for the last 10 years.

Also, I have discovered a way to mix vash and python code in one .sh script.
It's a mess sometimew but it works.

>Also, I have discovered a way to mix vash and python code in one .sh script
curious about how you do this. do you do this by simply calling the python script from within bash?
care to tell me your trick?

Which is faster for this short of thing bash or python. I would think it would be close.

But its not really python vs "bash" - its really python vs the whole suite of unix shell tools.

Therefore, you're going to spend most of your time in python implementing things that are already exist. watch, pr, tr, awk, grep, sed, at, cron, etc.

Depends on what you are doing

not necessarily.
when i decide python is a better choice i try not to re-implement important shell features. you can still quite easily pipe the data to a an existing shell binary and get its output

Windows user here, I learned Python because of the portability they touted, I learned the hard way that it's actually shit on Windows if you use anything outside of the std library, even then a lot of shit is restricted to Unix anyway. Go is much, MUCH better in every way for Windows in my opinion, everything builds the same, it all compiles down to a static binary, everything outside of the syscall package works on every platform and as a result third party libraries tend to work on Windows as well.

I want ot be clear that this is not an argument for Go even though I like Go, I am saying that everytime I had to do anything with Python on Windows, it's been a huge pain in the ass.

Sure, but then this is really just a discussion of "should I include python scripts among the arsenal of other shell utils and maybe glue things together with bash"....then the answer is yes, you should.

just wondering.
on windows, how does once install new scripts? on linux you can just use pip. how does this process work on windows?
my argument was to go with bash unless python is necessary. was just making the point that even when python is necessary you can still use bash's features, you dont need to necessarily choose one or the other

There's a lot to like about go, but its biggest detraction is that its an meme language used by SJW crossdressers at google.

WHY THE FUCK POSTING CODE GIVES ME CONNECTION ERROR???

use perl

it thinks some if it is spam.
if you have sections of somewhat irregular code such as strings of hex it will do this. take a screenshot of code and post image

Mods fucked up tag...

pastebin.com/cmuRfFfW

Yep, I agree - I use python when its just too much of a PIA to accomplish via bash (handling list, dictionaries, etc). Then pipe back out to bash and carry on.

You can call Linux tools from python and call python from bash.

neat, thanks for sharing!

Isn't perl dead as fuck?
We even stopped teaching perl to students. It's ogre. I blame smug "perl monks" who don't know what the fuck they are talking about.

Jesus Christ. This post is just Sup Forums Neue in a nutshell. Reeks of Sup Forums and r***it with absolutely zero into what the comment actually means.

*zero thought

what the fuck makes you think using python completely negates the possibility to use shell utils? python, as you said, is only the glue. perl + coreutils is much more useful than bash + coreutils and doesn't have a shitty fucking if [[[[[[[[[[[[ -e -f -g -h ]]]]]]]]]]]]]]]] syntax

Use the right tool for the job. If you have no intuition of what that is, that's your problem.

What's wrong with the bash IF syntax?
You forget about spaces or something?

I usually start with bash and then have to rewrite shit to python when the app grows and gains new functionality.

sounds right

I feel like you can't avoid this anymore no matter where you go, I bet you they are all over Python as well. In my opinion, as long as they're not on the committee or making meaningful changes to the language, I don't care because they don't affect me. Like Mozilla is a problem because it's run by SJWs who can't manage a project properly, but if Mozilla was sane and its users were crazy, then that'd be fine. That's how I feel with Go or any other language, as long as the language is good, I'll use it, even if some of the other users are insane, I don't care because I'm not going to spend time with them and they're not going to change the language.

>and they're not going to change the language.
>this syntax is sexist

Has this ever happened? Is there currently any plans to make this happen? If so, is it likely it will be voted in to any languages you know of?

I doubt it but I wouldn't be surprised either at this point.

github.com/ErisBlastar/cplusequality

I'm not trying to pull a "no real Scotsman" but that's a joke project.

third wave feminism used to be a joke too

bugs.freebsd.org/bugzilla/show_bug.cgi?id=155385

Not them, but recently I've kind of felt like I prefer using the "test" command explicitly over the bracketed syntax, seems more consistent in combination with non-built-ins, e.g.
if [ -e file ] && fgrep -qf keywords file
to
if test -e file && fgrep -qf keywords file
It's longer but makes it obvious that both can be thought of as simply calls to other programs that return either zero or non-zero values.

While I'm real mad about it, the removal of a joke in a man page isn't a language breaking syntax change and ultimately doesn't even effect the OS in this case. I want to stress though I am really angry that someone had to take something so innocent and purge it like that, it may not technically matter but it sure is disgusting to see.

This shit shows up on bugzilla all the time but for some reason examples of this shit are hard to find in google. Hmm....

I've written a few extremely useful bash scripts, mainly related to interacting with a remote torrent client.
They almost all consist of gluing things like curl, sed, jq, and the like together, which is the situation where bash shines.
They total about 250 lines, but that's probably not something you would call full-blown.

Why does it have to be this way.

Making procedures from existing tools is what Unix was built around, it's a really good thing.

I'd switch to python. As someone who's written in both bash and python for a while:

>python is easier to write
>python is easier to read
>python is cross platform

If you're writing bash, you probably don't care about cross platform, but if you have the option why not?

I can't think of a single system that has Python support but not bash, there's way more systems with bash built into the base than Python as well.

You're right about it being easier to read and right and I think it's better for writing applications over shell scripts but cross platform shouldn't be the reason.

He obviously thinks that any real programmer uses Windows. Yeah C# doesn't count. It's a pile of shit.

>as long as they're not on the committee or making meaningful changes to the language, I don't care because they don't affect me
Are you serious? Where have you been for the last 4 years. They WILL effect you and they will rise the ranks.

Go is nice to use.

Even Windows has been able to run a full POSIX suite for like, ever, INTEREX is old as shit and I think there was something before that even. Now there's even more options like msys2, cygwin, and even Microsofts own WSL.

So even on Windows, you can get your bash stuff working at various levels.

>running bash on windows
Do I look like a retard?
Will you also tell me to use Windows Server?

I don't even know where you're coming from on this one.

I never thought of using heredocs for inter-parsing

welcome to nu-Sup Forums post 2015 friend

Jesus Christ. This post is just Faux Oldfag Sup Forums in a nutshell. The poster clearly has no knowledge of Chrome nor Firefox SJW antics, and therefore has no ability to apply it to something like go.

You can always tell Faux Oldfags because they bothered to post.

array[width*row+column]
What's your problem?

I use it a lot with a small script to produce dynamic menus for a Gopher server. So instead of Python it reads in gophermap syntax and produces a menu.

Underlying implementation is not efficient. You have a 1D list of 1D lists.

Neat stuff right there. Heredocs are like a secret weapon.

Shit, that hit hard.

Fun fact : scientific community uses bash 2.7 and will continue to do so even when the support gets dropped. Nobody will rewrite working scripts written by students years ago.