Sponsored Content
Top Forums Shell Programming and Scripting Script to move the first line of a file to the end Post 302274349 by fpmurphy on Wednesday 7th of January 2009 11:46:04 AM
Old 01-07-2009
Quote:
Originally Posted by methyl
... We are learning from cfajohnson of a move towards Posix-2 , but to get "normal" Berkeley behaviour from commands such as "ps" and "xd" we often need to go outside Posix-2 and even the less-strict XPG4 standard
Some clarification is needed here in case readers think that "Posix-2" is some sort of a new standard or specification. It is not.

The last version of POSIX.2 standard, i.e. IEEE 1003.2-1992, was in 1992.
XPG4 is a specification and not a standard and has long been superceded by later TOG specifications.

IEEE 1003.2-1992 was subsumed into IEEE 1003-1 as part of the work of the Austin Common Standards Revision Group (the Austin Working Group) for IEEE 1003.1-2001. Work on the latest revision to IEEE 1003.1 is just complete. IEEE.1003.1-2008 was released in December 2008.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help on shell script : syntax error at line 62: `end of file' unexpected

Hi All, I have written a korn script (code pasted below). It is giving the error while debugging "new.sh: syntax error at line 62: `end of file' unexpected". I have re-written the whole code in VI and explored all help related to this error on this Unix forum and tried it. Somehow, I could... (7 Replies)
Discussion started by: schandrakar1
7 Replies

2. Shell Programming and Scripting

script to move two lines to the end of a file

My input file is multiline file and I am writing a script to search for a pattern and move the line with the pattern and the next line to the end of the file. Since I am trying to learn awk, I thought I would try it. My input looks like the following: D #testpoint 1 510.0 D #testpoint2 ... (5 Replies)
Discussion started by: banjo25
5 Replies

3. Shell Programming and Scripting

Move a line to end of file

Can somebody help me with a script .... Read a file /etc/inittab find the string starting with rcml and move it entirely towards the end of file. rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1 I basically want to change the startup sequence. (2 Replies)
Discussion started by: imanuk2007
2 Replies

4. Shell Programming and Scripting

awk script to move a line after the matched pattern line

I have the following text format in a file which lists the question first and then 5 choices after that the explanantion and finally the answer. 1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
2 Replies

5. Shell Programming and Scripting

help needed with shell script to append to the end of a specific line in a file on multiple servers

Hi Folks, I was given a task to append three IP's at the end of a specific (and unique) line within a file on multiple servers. I was not able to do that with the help of a script. All I could was: for i in server1 server2 server3 server4 do ssh $i done I know 'sed' could be used to... (5 Replies)
Discussion started by: momin
5 Replies

6. Shell Programming and Scripting

how to move a word to the end of file

Hey guys, I want move a specific word from the middle of the text and move it the end of the file, which means I want the word to be deleted from it's line and moved to the end of file. I know how to use sed for adding a word the end of file, but I don't know how to move words. tnx (2 Replies)
Discussion started by: Johanni
2 Replies

7. Shell Programming and Scripting

sed: how to move matched pattern to end of previous line

Hello, I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help. I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
Discussion started by: paroikoi
3 Replies

8. Shell Programming and Scripting

Cannot execute/finish script because of last line syntax error: unexpected end of file/token `done'

first of all I thought the argument DONE is necessary for all scripts that have or begin with do statements which I have on my script, However, I still don't completely understand why I am receiving an error I tried adding another done argument statement but didn't do any good. I appreciate... (3 Replies)
Discussion started by: wolf@=NK
3 Replies

9. Shell Programming and Scripting

With script bash, read file line per line starting at the end

Hello, I'm works on Ubuntu server My goal : I would like to read file line per line, but i want to started at the end of file. Currently, I use instructions : while read line; do COMMAND done < /var/log/apache2/access.log But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
STANDARDS(7)						     Linux Programmer's Manual						      STANDARDS(7)

NAME
standards - C and UNIX Standards DESCRIPTION
The CONFORMING TO section that appears in many manual pages identifies various standards to which the documented interface conforms. The following list briefly describes these standards. V7 Version 7, the ancestral UNIX from Bell Labs. 4.2BSD This is an implementation standard defined by the 4.2 release of the Berkeley Software Distribution, released by the University of California at Berkeley. This was the first Berkeley release that contained a TCP/IP stack and the sockets API. 4.2BSD was released in 1983. Earlier major BSD releases included 3BSD (1980), 4BSD (1980), and 4.1BSD (1981). 4.3BSD The successor to 4.2BSD, released in 1986. 4.4BSD The successor to 4.3BSD, released in 1993. This was the last major Berkeley release. System V This is an implementation standard defined by AT&T's milestone 1983 release of its commercial System V (five) release. The previous major AT&T release was System III, released in 1981. System V release 2 (SVr2) This was the next System V release, made in 1985. The SVr2 was formally described in the System V Interface Definition version 1 (SVID 1) published in 1985. System V release 3 (SVr3) This was the successor to SVr2, released in 1986. This release was formally described in the System V Interface Definition version 2 (SVID 2). System V release 4 (SVr4) This was the successor to SVr3, released in 1989. This version of System V is described in the "Programmer's Reference Manual: Operating System API (Intel processors)" (Prentice-Hall 1992, ISBN 0-13-951294-2) This release was formally described in the System V Interface Definition version 3 (SVID 3), and is considered the definitive System V release. SVID 4 System V Interface Definition version 4, issued in 1995. Available online at <http://www.sco.com/developers/devspecs/>. C89 This was the first C language standard, ratified by ANSI (American National Standards Institute) in 1989 (X3.159-1989). Sometimes this is known as ANSI C, but since C99 is also an ANSI standard, this term is ambiguous. This standard was also ratified by ISO (International Standards Organization) in 1990 (ISO/IEC 9899:1990), and is thus occasionally referred to as ISO C90. C99 This revision of the C language standard was ratified by ISO in 1999 (ISO/IEC 9899:1999). Available online at <http://www.open- std.org/jtc1/sc22/wg14/www/standards>. POSIX.1-1990 "Portable Operating System Interface for Computing Environments". IEEE 1003.1-1990 part 1, ratified by ISO in 1990 (ISO/IEC 9945-1:1990). The term "POSIX" was coined by Richard Stallman. POSIX.2 IEEE Std 1003.2-1992, describing commands and utilities, ratified by ISO in 1993 (ISO/IEC 9945-2:1993). POSIX.1b (formerly known as POSIX.4) IEEE Std 1003.1b-1993 describing real-time facilities for portable operating systems, ratified by ISO in 1996 (ISO/IEC 9945-1:1996). POSIX.1c IEEE Std 1003.1c-1995 describing the POSIX threads interfaces. POSIX.1d IEEE Std 1003.1c-1999 describing additional real-time extensions. POSIX.1g IEEE Std 1003.1g-2000 describing networking APIs (including sockets). POSIX.1j IEEE Std 1003.1j-2000 describing advanced real-time extensions. POSIX.1-1996 A 1996 revision of POSIX.1 which incorporated POSIX.1b and POSIX.1c. XPG3 Released in 1989, this was the first significant release of the X/Open Portability Guide, produced by the X/Open Company, a multi- vendor consortium. This multivolume guide was based on the POSIX standards. XPG4 A revision of the X/Open Portability Guide, released in 1992. XPG4v2 A 1994 revision of XPG4. This is also referred to as Spec 1170, where 1170 referred to the number of interfaces defined by this standard. SUS (SUSv1) Single UNIX Specification. This was a repackaging of XPG4v2 and other X/Open standards (X/Open Curses Issue 4 version 2, X/Open Networking Service (XNS) Issue 4). Systems conforming to this standard can be branded UNIX 95. SUSv2 Single UNIX Specification version 2. Sometimes also referred to as XPG5. This standard appeared in 1997. Systems conforming to this standard can be branded UNIX 98. See also <http://www.UNIX-systems.org/version2/>.) POSIX.1-2001, SUSv3 This was a 2001 revision and consolidation of the POSIX.1, POSIX.2, and SUS standards into a single document, conducted under the auspices of the Austin group <http://www.opengroup.org/austin/>. The standard is available online at <http://www.unix-systems.org /version3/>, and the interfaces that it describes are also available in the Linux manual pages package under sections 1p and 3p (e.g., "man 3p open"). The standard defines two levels of conformance: POSIX conformance, which is a baseline set of interfaces required of a conforming system; and XSI Conformance, which additionally mandates a set of interfaces (the "XSI extension") which are only optional for POSIX conformance. XSI-conformant systems can be branded UNIX 03. (XSI conformance constitutes the Single UNIX Specification version 3 (SUSv3).) The POSIX.1-2001 document is broken into four parts: XBD: Definitions, terms and concepts, header file specifications. XSH: Specifications of functions (i.e., system calls and library functions in actual implementations). XCU: Specifications of commands and utilities (i.e., the area formerly described by POSIX.2). XRAT: Informative text on the other parts of the standard. POSIX.1-2001 is aligned with C99, so that all of the library functions standardized in C99 are also standardized in POSIX.1-2001. Two Technical Corrigenda (minor fixes and improvements) of the original 2001 standard have occurred: TC1 in 2003 (referred to as POSIX.1-2003), and TC2 in 2004 (referred to as POSIX.1-2004). POSIX.1-2008, SUSv4 Work on the next revision of POSIX.1/SUS was completed and ratified in 2008. The changes in this revision are not as large as those that occurred for POSIX.1-2001/SUSv3, but a number of new interfaces are added and various details of existing specifications are modified. Many of the interfaces that were optional in POSIX.1-2001 become mandatory in the 2008 revision of the standard. A few interfaces that are present in POSIX.1-2001 are marked as obsolete in POSIX.1-2008, or removed from the standard altogether. The revised standard is broken into the same four parts as POSIX.1-2001, and again there are two levels of conformance: the baseline POSIX Conformance, and XSI Conformance, which mandates an additional set of interfaces beyond those in the base specification. In general, where the CONFORMING TO section of a manual page lists POSIX.1-2001, it can be assumed that the interface also conforms to POSIX.1-2008, unless otherwise noted. Further information can be found on the Austin group web site, <http://www.opengroup.org/austin/>. SEE ALSO
feature_test_macros(7), libc(7), posixoptions(7) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-08-05 STANDARDS(7)
All times are GMT -4. The time now is 01:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy