[slightly OT] writing "POSIX-compatible" scripts, and script analysis tools?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  (admittedly not an actual "fedora" topic but i'm sure i'll get some
good advice here.)

  i'm currently perusing someone else's collection of shell scripts,
and looking to add more, and want to clarify once and for all the
meaning of writing (and verifying) the "POSIX-ness" of shell scripts,
and what tools i can use to detect "bashisms" (or lack of POSIX-ness)
in scripts.

  first, can i verify that trying to keep my scripts as POSIX-compatible
as possible is a good thing? i've always assumed that, just curious as
to what others think, and how much effort they put into adhering to
the POSIX standard (thereby giving up all those cool bash extensions).

  next, if i want to enforce POSIX-ness, is it just a matter of using

    #!/bin/sh --posix

actually, i already know it's not that simple, since i'm sure i've
read that even adding that "--posix" option still leaves some
non-POSIX features active; i'll re-read the docs to verify that.

  finally, pointers to shell analysis utilities? WRT fedora packages,
i've already found:

  * devscripts-checkbashisms
  * ShellCheck

and i suspect there are others.

  so, thoughts? and any pointers to online coverage of this stuff?
thank you kindly.

rday
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux