Maybe it’s becuase i grew up on python and bash still seems somewhat alien to me, but any time I’m crafting something with more than three or so nested functions, I use python as a wrapper for bash. Python initiates a bash script, parses the retval, inititates the next bash script from that data, etc.
If it were a ban on the rare earth minerals themselves, yes, but a ban on the extraction technologies just secures dependence on Chinese sources.
The reason China is a major exporter of these minerals has less to do with their availability in China and more to do with their lax environmental regulations, which allow extraction via means that are prohibited in many other countries.
So preventing their extraction in countries where stricter environmental standards are in place just means more environmental damage.