#181: tac command missing in OSX ------------------------+--------------------------------------------------- Reporter: kyngchaos | Owner: [email protected] Type: defect | Status: new Priority: minor | Milestone: 6.3.1 Component: default | Version: 6.3.0 Resolution: | Keywords: v.in.garmin, v.in.mapgen ------------------------+--------------------------------------------------- Comment (by glynn):
> > How about testing for the -r flag, as I mentioned? > > I'd recommend to check for the existence of `tac` instead, Agreed. > like (untested): I suggest either using "type", or just running e.g. "tac < /dev/null" and checking for an error. Scanning the path is problematic; it doesn't allow for shell built-ins or aliases, may not allow for extensions on Windows, etc. That still doesn't solve the issue of what to do if the system has neither tac nor "tail -r", neither of which are mandated by POSIX/XPG/SUS. Off the top of my head, the only thing that I can think of is to prefix each line with the line number using e.g. awk, use "sort -r", then strip the line numbers. -- Ticket URL: <http://trac.osgeo.org/grass/ticket/181#comment:5> GRASS GIS <http://grass.osgeo.org>
_______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
