How to split a file using a numeric suffix

Since the primary help from GNU split says: Usage: /usr/gnu/bin/split [OPTION]… [INPUT [PREFIX]] Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, …; default size is 1000 lines, and default PREFIX is ‘x’. With no INPUT, or when INPUT is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -a, … Read more

How can I run shell (terminal) in Google Colab?

You can use jQuery Terminal Emulator backed with google.colab.kernel.invokeFunction Here’s an example notebook. The key part is here, where you back it with shell function. def shell(command): return JSON([getoutput(command)]) output.register_callback(‘shell’, shell) And here’s how you use invokeFunction: try { let res = await google.colab.kernel.invokeFunction(‘shell’, [command]) let out = res.data[‘application/json’][0] this.echo(new String(out)) } catch(e) { this.error(new … Read more

MongoDB running but can’t connect using shell

I think there is some default config what is missing in this version of mongoDb client. Try to run: mongo 127.0.0.1:27017 It’s strange, but then I’ve experienced the issue went away 🙂 (so the simple command ‘mongo’ w/o any params started to work again for me) [Ubuntu Linux 11.10 x64 / MongoDB 2.0.1]