Tips on using the Curl Command in Linux
tecmint.com
tecmint.com
You have a true once in a life time opportunity with how badly Apple is screwing the hardware pooch, if your hardware division could put out a laptop to rival the retina Macbook pro with up to date hardware and an excellent command line ecosystem you could very well shift an entire generation away from OsX.
Thanks for all the hard work I'm using Linux for windows right now.
Surface?
[1] https://code.visualstudio.com/
People who work extensively in Windows environments tell me that Powershell is very, well, powerful, and I'm sure it is for certain select use cases of interacting with Windows' internals. But it's baffling, however, how completely incapable it is of handling basic things like sane, well-explained escaping behavior.
I've attempted to find explanations for how people using Powershell should properly escape JSON (either for sending to HTTP APIs or for setting JSON environment variables when using Docker for Windows) and have concluded that it's basically impossible, as the escaping behavior is so different from *nix shells and appears to be documented nowhere.
Supporting it is further complicated by lack of readily available test environments: even if I wasn't running Linux myself, spinning up a VM is free because there's no software license. This isn't the case with OS X, but I can at least assume that OS X bash works the same as Linux bash for 99% of things. Powershell is completely alien and I know of no free way to try it--maybe Azure provides some variant on their free tier, but I haven't looked into it much (my overall experience trying out Azure was that it was a dumpster fire to be avoided at all costs unless you need cloud AD, in which case it's probably amazing).
You can escape things with `. So "{`"foo`": `"an \`"escaped \`" value`"}". Or because powershell has types and objects you can just use native objects and hashes, then pipe it to `ConvertTo-Json` when you need a string.[0]
> Powershell is completely alien and I know of no free way to try it
Powershell is opensource and cross-platform as of last year. [1] Though its still definitely windows first.
0: http://wahlnetwork.com/2016/02/18/using-powershell-arrays-an...
Download and decompress in one go
curl -C - -O http://yourdomain.com/yourfile.tar.gz
Why the dash between the -C and -O? grep -e '-.*standard input' /usr/share/man/man1/*I also like that it's Python and I can probably change something in its source more easily and quickly than I can with cURL.