03-15-2019
Speaking strictly as a scientist: python ruby, and julia are extremely important for research and analysis.
GNU supports the environment variable
POSIXLY_CORRECT. This helps a lot when you are porting code back and forth between several platforms. I would suggest that you check it out. Defining it changes behavior to be pretty close to POSIX. Not perfect, IMO.
Linux is effectively inescapable in modern data centers. Even appliances like routers run on embedded Linux. So does your refrigerator ....
GNU.org position on POSIX:
GNU Coding Standards: Non-GNU Standards
Some OSes kind of go off the deep end in attempt to be a sort of "all versions of standards" - which is kind of what you are discussing here.
Solaris is an example:
Compliance with standards in that OS - for a new user or somebody porting an app - can be confusing. You get different versions of
awk,
tr and so on. This depends on which of several possible paths, and their order, ex:
/usr/xpg4/bin versus
/usr/bin, you have set up in
PATH. This can break a lot of things that worked correctly on HP-UX but not Solaris, for example. I spent a lot of time tweaking the PATH variable for different applications and their associated users
XPG4 -
man pages section 5: Standards, Environments, and Macros
Don Cragun here actively works on standards, and definitely will have have some opinions here.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am having a problem executing a sed substitute in a file. I have tried alot of different things I found in previous posts, however non seem to work.
I want to substitute this in $FILE:
VALUE=33.4
In the script I have tried the following:
prev=$(awk -F"=" '{ print $2 }' $FILE )
new=$(echo... (16 Replies)
Discussion started by: newbreed1
16 Replies
2. UNIX for Dummies Questions & Answers
im having trouble doing this:
i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba
is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's?
im guessing its like getting the 1's compliment of the string
im doing this in... (2 Replies)
Discussion started by: vipervenom25
2 Replies
3. Shell Programming and Scripting
Hi All,
I'm currently using SED to make various changes to some .xml files I'm working on, but I'm stuck on this particular problem.
I want to remove '<placeholder>element-name</placeholder>' from the following:
<heading>Element <placeholder>element-name</placeholder> not... (2 Replies)
Discussion started by: Steve_altius
2 Replies
4. AIX
i am a newbie to shell script,so i want a kshell script in which i need to check for a particular character inside a file through conditional looping(like if ,case,while)and if that character exists ,then substitute a given character to that character.
consider a file test.txt,inside the file... (1 Reply)
Discussion started by: karthikprasathk
1 Replies
5. Shell Programming and Scripting
I am trying to get rid of some ending tags but I run into some problems.
Ex.
How are you?</EndTag><Begin>It is fine.</Begin><New> Just about
I am trying to get rid of the ending tags, starts with </ and ending with >. (which is </EndTag> and </Begin>)
I tried the following
sed... (2 Replies)
Discussion started by: quixoticking11
2 Replies
6. UNIX for Dummies Questions & Answers
I'm using sed to perform a simply search and replace. The typical data is:
<fig><image href="Graphics/BAV.gif" align="left" placement="break"
I need to replace the value in the first set of quotes, keeping the remainder of the line the same. Thus:
<fig><image href="NEW_VALUE" align="left"... (3 Replies)
Discussion started by: Steve_altius
3 Replies
7. Shell Programming and Scripting
Hi All,
Here is what I'm trying to do with sed:
Input File:
somechangeVariable1=Something I would like to change
somechangeVariable2=Something else I would like to change
...
Output File:
somechangeVariable1=Something I would like to different
somechangeVariable2=Something else I would... (6 Replies)
Discussion started by: Peace_Dude1
6 Replies
8. Shell Programming and Scripting
Is there a way to substitute the URL-encoding references of ( & and ` ) with their actual appearance? for example....
%26 is &
say I want to convert every %26 in my file to &.....
awk '{gsub(/%26/,"&");print}'
Is there a way to do this?
I also want to be able to convert ` too! (3 Replies)
Discussion started by: puttster
3 Replies
9. Shell Programming and Scripting
Hi ,
I have input file like below
Hi this is "vinoth".
Hi happy to work with 'unix'
USA(united states of America)
My script variables are below :
Dquote=Ộ
Squote=&#$567
Obrac=&^986
Cbrac=&^745
I want to read the variables in my SED command to replace the double quote,single... (9 Replies)
Discussion started by: vinothsekark
9 Replies
10. Shell Programming and Scripting
I am trying to do what I thought should be a simple substitution, but I can't get it to work.
File:
Desire output:
I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
LEARN ABOUT OPENSOLARIS
intro
Intro(5) Standards, Environments, and Macros Intro(5)
NAME
Intro, intro - introduction to miscellany
DESCRIPTION
Among the topics presented in this section are:
Standards The POSIX (IEEE) Standards and the X/Open Specifications are described on the standards page.
Environments The user environment (environ), the subset of the user environment that depends on language and cultural conventions
(locale), the large file compilation environment (lfcompile), and the transitional compilation environment (lfcompile64)
are described.
Macros The macros to format Reference Manual pages (man and mansun) as well as other text format macros (me, mm, and ms) are
described.
Characters Tables of character sets (ascii, charmap, eqnchar, and iconv), file format notation (formats), file name pattern matching
(fnmatch), and regular expressions (regex and regexp) are presented.
ACKNOWLEDGMENTS
Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Origi-
nal documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documenta-
tion.
In the following statement, the phrase ``this text'' refers to portions of the system documentation.
Portions of this text are reprinted and reproduced in electronic form in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright
(C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between
these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document.
The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
This notice shall appear on any product containing this material.
SunOS 5.11 17 Nov 2008 Intro(5)