38 ms·
> cross-platform automation > bash Nope. Show me the script that gets a list of mounted filesytems for locally attached disks and flags any that are larger t
by justinsaccount 9y ago
> cross-platform automation
> bash
Nope. Show me the script that gets a list of mounted filesytems for locally attached disks and flags any that are larger than 20G and are more than 90% full.
Since it is cross platform it will run the same on linux/bsd/os x and windows, right?
- blacksmith_tb 9y agoI haven't used the Windows Subsystem for Linux much, but shouldn't it be possible to have a bash script that runs on all of them? (though it might take some testing against the environment, for things like osx's /Volumes etc.)
- maxsilver 9y agoI use WSL daily, and yes you can see your entire C:\ drive in WSL under /mnt/c/, and all the common directory commands work, so running a bash script is 'cross-platform' in that way. That's sort of cheating though. In that instance, Bash isn't really being cross platform, so much as Windows bent over backwards to re-implement lots of Linux underneath Bash, so Bash could treat Linux and Linux (on Windows) identically. Or to restate that: If Linux apps get to claim they are 'cross-platform' because of WSL, then Windows apps get to claim they are 'cross-platform' because you could run them in WINE.
- justinsaccount 9y agoExactly.. It's sort of possible.. if nothing goes wrong and you remember to run df in posix mode and you manage to parse the output correctly.
- rkeene2 9y agoDon't forget about AIX, Solaris, and IRIX :-)
- vram22 9y agoAnd HP-UX, Ultrix, Tru64, and probably a few more. https://en.wikipedia.org/wiki/HP-UX https://en.wikipedia.org/wiki/HP-UX I used HP-UX for a while; it was good. In fact I first wrote this Unix utility [1] (and later an IBM developerWorks article about it) on an HP-UX system, for a big manufacturing client. HP-UX was pretty stable and had a good patch management system. Had some good tools from HP on top of the OS, such as GlancePlus, Ignite-UX, Process Resource Manager, etc., and another high-end one called MC ServiceGuard. https://en.wikipedia.org/wiki/Ultrix https://en.wikipedia.org/wiki/Ultrix https://en.wikipedia.org/wiki/Tru64_UNIX https://en.wikipedia.org/wiki/Tru64_UNIX Edit: Sorry, forgot to add the link I quoted above. Done now: [1] https://jugad2.blogspot.in/2014/09/my-ibm-developerworks-article.html https://jugad2.blogspot.in/2014/09/my-ibm-developerworks-art... It's a tutorial on the topic: Developing a Linux command-line utility (in C).
- rkeene2 9y agoHP-UX is still alive until 2025 apparently. I used on my workstation for a while (an HP Visualize C3000) in the 90s -- it was my first 64-bit workstation. It's not great.
- vram22 9y agoInteresting. Haven't used it for a while. I miss that OS. Last used it some years ago, so things have moved on since then. For the time, I found it good, though. And HP had pretty good quality in those days - in both hardware and software (the stuff I used, anyway). Also, I only used it on HP business servers - the PA-RISC series, not on their workstations. Don't know, but there could be some differences in the HP-UX versions between the servers and workstations, the latter which, IIRC, were based on the acquisition of Apollo (but don't know much about that).
- rkeene2 9y agoThe HP Visualize C3000 is a PA-RISC 2.0 system (2x 400MHz processors). I still build a cross-compiler toolchain for HP-UX PA-RISC 2.0 long-mode (64-bit address mode).