Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Is appending to file with >> interruptable? Post 8442 by ragtopgeek on Thursday 11th of October 2001 12:42:42 PM
Old 10-11-2001
Thanks! I was reading Steven's "Unix System Programming..."
book last night to get some insight. You are right in that it
depends on how the individual output commands are
implemented with regard to using system i/o functions.

I am playing around with trying to create/get interleaved
results. If I have any luck, I'll post.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Appending out to a file

Hi, once again - Ok here it is: a).I used the touch command to create a file (touch directory.list) b).I then added this line: - date '+The date is %a %h %d, %Y %nIt is %I:%M %p' > directory.list -So that this date function would go at the top of my script c).Now I want to display a... (1 Reply)
Discussion started by: Astudent
1 Replies

2. Shell Programming and Scripting

Reading specific contents from a file and appending it to another file

Hi, I need to write a shell script (ksh) to read contents starting at a specific location from one file and append the contents at specific location in another file. Please find below the contents of the source file that I need to read the contents from, File 1 -----# more... (5 Replies)
Discussion started by: dnicky
5 Replies

3. Shell Programming and Scripting

appending to sed output of one file into the middle of file

hi, i have a file file1 file2 ----------- ----------------- aa bbb ccc 111 1111 1111 ddd eee fff 222 3333 4444 ggg hhh... (5 Replies)
Discussion started by: go4desperado
5 Replies

4. Shell Programming and Scripting

searching a log file and appending to a .txt file

I'm new to shell scripting and am writing a script to help me log the free memory and hd space on a server. As of now, the script just runs 'df -h' and appends the output to a file and then runs 'top' and appends the output to a log file. What I want to do, is have the script also search the... (3 Replies)
Discussion started by: enator45
3 Replies

5. Shell Programming and Scripting

appending the count of line in each file at head of each file

hello everybody, I have some files in directory.each file contain some data. my requirement is add the count of each line of file in head of each file. any advice !!!!!!!! (4 Replies)
Discussion started by: abhigrkist
4 Replies

6. Shell Programming and Scripting

Appending number of lines in the file to begining of the file

I am having 6 files named file1,file2....file6 and i need to append number of lines in each file to begining of the file. For example, If file 1 contains a b c d then after adding new line file1 should contain 4 a b c d Thanks in advance. (2 Replies)
Discussion started by: akhay_ms
2 Replies

7. Shell Programming and Scripting

Removing part of a file name and appending into a single file

I have two files like ABC_DEF_yyyyymmdd_hhmiss_XXX.txt and ABC_DEF_yyyyymmdd_hhmiss_YYY.txt. The date part is going to be changing everytime. How do i remove this date part of the file and create a single file like ABC_DEF_XXX.txt. (8 Replies)
Discussion started by: varlax
8 Replies

8. Shell Programming and Scripting

Appending to file with new ID

I have a file that looks like this: 1|A 2|B 3|C ... ... 100|A I would like to take the last line in the file and add +1 to the number so the output looks like this 1|A (4 Replies)
Discussion started by: BeefStu
4 Replies

9. Red Hat

Process with S state(Interruptable) in RHEL and gives Advertise error after restarting/Killing the p

Hello, In our Production system one process is in S state(interruptible)and after killing and restarting the process gives 'advertise error'. This error goes after rebooting the Server. I have RHEL 5.9 (tikanga) OS in our server. We tried debugging the issue with the help of 'strace' command... (9 Replies)
Discussion started by: Rohits
9 Replies

10. Shell Programming and Scripting

Appending content of a file to another file before a specific character

Hi there, i've got a file with this content $ cat file1 Matt Mar The other file has the same number of lines with this content: $ cat file2 20404=767294 23450=32427 is there a way with either using sed, awk or paste to insert the content of file1 before the "=" character? So... (3 Replies)
Discussion started by: nms
3 Replies
C(7)						       BSD Miscellaneous Information Manual						      C(7)

NAME
c, c78, c89, c90, c99 -- The C programming language DESCRIPTION
C is a general purpose programming language, which has a strong connection with the UNIX operating system and its derivatives, since the vast majority of those systems were written in the C language. The C language contains some basic ideas from the BCPL language through the B lan- guage written by Ken Thompson in 1970 for the DEC PDP-7 machines. The development of the UNIX operating system was started on a PDP-7 machine in assembly language, but this choice made it very difficult to port the existing code to other systems. In 1972 Dennis M. Ritchie worked out the C programming language for further development of the UNIX operating system. The idea was to imple- ment only the C compiler for different platforms, and implement most parts of the operating system in the new programming language to sim- plify the portability between different architectures. It follows that C is very well adapted for (but not limited to) writing operating systems and low-level applications. The C language did not have a specification or standardized version for a long time. It went through a lot of changes and improvements for ages. In 1978, Brian W. Kernighan and Dennis M. Ritchie published the first book about C under the title ``The C Programming Language''. We can think of this book as the first specification of the language. This version is often referred to as ``K&R C'' after the names of the authors. Sometimes it is referred to as C78, as well, after the publishing year of the first edition of the book. It is important to notice that the instruction set of the language is limited to the most fundamental elements for simplicity. Handling of the standard I/O and similar common functions are implemented in the libraries shipped with the compiler. As these functions are also widely used, it was demanded to include into the description what requisites the library should conform to, not just strictly the language itself. Accordingly, the aforementioned standards cover the library elements, as well. The elements of this standard library are still not enough for more complicated tasks. In this case the provided system calls of the given operating system can be used. To not lose the portability by using these system calls, the POSIX (Portable Operating System Interface (for Unix)) standard evolved. It describes what functions should be available to keep portability. Note, that POSIX is not a C standard, but an operating system standard and thus is beyond the scope of this manual. The standards discussed below are all C standards and only cover the C programming language and the accompanying library. After the publication of the book mentioned before, the American National Standards Institute (ANSI) started to work on standardizing the language, and in 1989 they announced ANSI X3.159-1989. It is usually referred to as ANSI C or C89. The main difference in this standard were the function prototypes, which was a new way of declaring functions. With the old-style function declarations, the compiler was unable to check the sanity of the actual parameters of a function call. The old syntax was highly error-prone because incompatible parameters were hard to detect in the program code and the problem only showed up at run-time. In 1990, the International Organization for Standardization (ISO) adopted the ANSI standard as ISO/IEC 9899:1990. This is also referred to as ISO C or C90. It only contains negligible minor modifications against ANSI C, so the two standards are often considered to be fully equivalent. This was a very important milestone in the history of the C language, but the development of the language did not stop. The ISO C standard was later extended with an amendment as ISO/IEC 9899 AM1 in 1995. This contained, for example, the wide-character support in wchar.h and wctype.h. Two corrigenda were also published: Technical Corrigendum 1 as ISO/IEC 9899 TCOR1 in 1995 and Technical Corrigendum 2 as ISO/IEC 9899 TCOR2 in 1996. The continuous development and growth made it necessary to work out a new standard, which contains the new features and fixes the known defects and deficiencies of the language. As a result, ISO/IEC 9899:1999 was born in 1999. Similarly to the other standards, this is referred to after the publication year as C99. The improvements include the following: o Inline functions. o Support for variable length arrays. o New high-precision integer type named long long int, and other integer types described in stdint(3) and inttypes(3). o New boolean data type; see stdbool(3). o One line comments taken from the C++ language. o Some new preprocessor features. o A predefined identifier __func__ and a restrict type qualifier. o New variables can be declared anywhere, not just in the beginning of the program or program blocks. o No implicit int type. Since then no new standards have been published, but the C language is still evolving. New and useful features have been showing up in the most famous C compiler: GNU C (gcc(1)). Most of the UNIX-like operating systems use GNU C as a system compiler, but the various extensions of GNU C, such as attribute(3) or typeof(3), should not be considered standard features. SEE ALSO
c89(1), c99(1), cc(1), cdefs(3) Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Prentice Hall, Second Edition, 40th printing, 1988. STANDARDS
ANSI, X3.159-1989. ISO/IEC, 9899:1990, Programming languages -- C. ISO/IEC, 9899 AM1. ISO/IEC, 9899 TCOR1, Programming languages -- C, Technical Corrigendum 1. ISO/IEC, 9899 TCOR2, Programming languages -- C, Technical Corrigendum 2. ISO/IEC, 9899:1999, Programming languages -- C. ISO/IEC, 9899:1999 TCOR1, Programming languages -- C, Technical Corrigendum 1. ISO/IEC, 9899:1999 TCOR2, Programming languages -- C, Technical Corrigendum 2. ISO/IEC, 9899:1999 TCOR3, Programming languages -- C, Technical Corrigendum 3. HISTORY
This manual page first appeared in FreeBSD 9.0 and NetBSD 6.0. AUTHORS
This manual page was written by Gabor Kovesdan <gabor@FreeBSD.org>. BSD
March 30, 2011 BSD
All times are GMT -4. The time now is 06:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy