Substitute a character with sed

Login or Register to Reply

Thread Tools Search this Thread
# 16  
Old 2 Days Ago
When I was working at Sun, you could set PATH to include various *bin directories in various different orders to get an environment that met the requirements of several standards including (but not limited to) SVID3, XPG3, XPG4, XPG5, SUSv1, SUSv2, each of the revisions of the POSIX.1 and POSIX.2 standards (and most of the other POSIX standards except for POSIX.3), and also some versions of BSD and UNIX System V.

I make no claims about what has happened to that guaranteed backwards compatibility between releases since Oracle bought out Sun. (It may still work, I just don't know.)

If you don't consider shell and awk to be programming languages, the POSIX standards do still provide the C programming language. The current version of the POSIX standards are built on top of the 1999 ISO C Standard. The next revision of the POSIX standards will be built on top of the 2011 or 2017 C standard (depending on whether the Austin Group or the ISO C committee gets their next revision ready first. At one time there were POSIX working groups working on Ada and C++ bindings to POSIX.1, but those groups are no longer active. The Austin Group does still work closely with both the ISO C and ISO C++ working groups and although there is no C++ compiler specified in the POSIX.2 standard, the ISO C++ standard libraries are intended to be fully compatible with the POSIX.1 standards.

I was once offered up as a sacrificial lamb to attend some meetings helping to define standards for the Linux operating system. I was immediately deemed to be an enemy of everything that committee wanted to do. I believed that standards were created to help users write portable code; everyone else in the room thought standards were written to constrain operating systems development. Where the SVID, XPG, SUS, and POSIX standard specified requirements that conforming operating systems had to supply; the LSB (Linus Standards Base) went a different way. The LSB defined the names of some functions that the Linux operating system had to supply, but only gave very brief descriptions of what those functions did. The definition of how those functions behaved is defined by the source code for the Linux operating system; not by any document that an applications programmer could use to determine how to write a portable application that would run on any Linux system. If you write an application that conforms to the LSB and it works on one Linux system today, there is no guarantee that it will work on any Linux operating system tomorrow.

That was twenty-five years ago. Today, some Linux vendors actively participate in the Austin Group and try to mostly comply with POSIX requirements. (Note mostly; not completely. No Linux vendor has gotten a POSIX or UNIX certification demonstrating that their implementation passes the verification suites testing conformance to the POSIX standards nor the Single UNIX Specifications yet.)

Note that all of the above is my own biased opinion. Other people may well have different opinions.
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
sed searches a character string for a specified delimiter character, and returns a leading or traili fspalero Shell Programming and Scripting 2 01-09-2017 04:31 AM
[sed]: Substitute a string with a multiline value dae Shell Programming and Scripting 4 08-02-2016 04:56 PM
sed substitute command -- need help pathunkathunk Shell Programming and Scripting 3 03-07-2013 12:55 PM
sed fails to apply substitute commands Adolf1994 Shell Programming and Scripting 23 08-08-2012 10:58 AM
How to substitute variable in sed for special character? vinothsekark Shell Programming and Scripting 9 04-29-2012 06:39 AM
using sed or gsub to substitute characters! puttster Shell Programming and Scripting 3 10-31-2010 03:00 AM
In Sed how can I replace starting from the 7th character to the 15th character. mohullah Shell Programming and Scripting 5 09-22-2010 08:39 PM
how to substitute filepaths with sed or awk? ergy1983 Shell Programming and Scripting 3 07-02-2010 10:28 AM
Sed question to substitute data in \2 Peace_Dude1 Shell Programming and Scripting 6 05-28-2010 02:26 PM
Using sed to substitute between quotes. Steve_altius UNIX for Dummies Questions & Answers 3 06-22-2009 09:00 AM
Using sed to substitute first occurrence quixoticking11 Shell Programming and Scripting 2 07-09-2008 10:36 AM
check for a particular character inside a file and substitute with a given character? karthikprasathk AIX 1 07-01-2008 03:29 AM
Using SED to substitute between two patterns. Steve_altius Shell Programming and Scripting 2 06-10-2008 12:03 PM
read a variable character by character, substitute characters with something else vipervenom25 UNIX for Dummies Questions & Answers 2 06-06-2008 03:18 PM
sed substitute situation newbreed1 UNIX for Dummies Questions & Answers 16 06-03-2005 02:26 PM