Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tmpfile(3) [osf1 man page]

tmpfile(3)						     Library Functions Manual							tmpfile(3)

NAME
tmpfile - Creates a temporary file LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <stdio.h> FILE *tmpfile ( void ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: tmpfile(): XSH4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The tmpfile() function creates a temporary file and returns its FILE pointer. The file is opened for update. The temporary file is automat- ically deleted when the process using it terminates. RETURN VALUES
Upon successful completion, the tmpfile() function returns a pointer to the stream of the file that is created. Otherwise, it returns a null pointer and sets errno to indicate the error. ERRORS
The tmpfile() function sets errno to the specified values for the following conditions: A signal was caught during tmpfile(). OPEN_MAX file descriptors are currently open in the calling process. [Tru64 UNIX] All available file descriptors are currently open in the calling process. The maximum allowable number of files is currently open in the system. The directory or file system that would contain the new file cannot be expanded. RELATED INFORMATION
Functions: fopen(3), mktemp(3), tmpnam(3), unlink(2), getdtablesize(2) Standards: standards(5) delim off tmpfile(3)
Man Page

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Sed command help reqiored

Can somebody explain me what exactly will happen with this command, step by step. eval sed " -e 's/?1/${JOB_NAME}/g' -e 's/?DT/${DT}/g'" ${SCRIPT_1} > ${SCRIPT_1_2} 2> ${tmpfile} (1 Reply)
Discussion started by: satgur
1 Replies

2. UNIX for Dummies Questions & Answers

deleting another user's files

hi, I have two users, let us call them A and B. I do as User A touch tmpfile chmod 700 tmpfile Now as User B I do rm tmpfile - and it allows me to do it (after prompting me)...why? If I had done chmod 777 tmpfile, then sure User B should be able to delete it, but I did chmod 700... (3 Replies)
Discussion started by: JamesByars
3 Replies

3. Programming

how to replace "cd.h" to <cd.h> in a dir

Hi, I have to change include path for cd.h file in a directory whic having morethan 100 files. i tried with below sed commnds but failed. sed 's/\"\cd\.\h\"/\<\cd\.\h\>/g' >tmpfile sed 's/\"cd.h"\/\<cd.h>\/g' *.c >tmp some body please help me .. I am using HP_UX 10.20 and do... (2 Replies)
Discussion started by: jagan_kalluri
2 Replies

4. Shell Programming and Scripting

best way to insert a line at the top of a file?

say I want to insert "this is a test" as the first line into file A, besides echo "this is a test" > /tmp/tmpfile cat /tmp/tmpfile fileA >> /tmp/result, is there any simple way I can do it? thanks (7 Replies)
Discussion started by: fedora
7 Replies

5. Shell Programming and Scripting

Text data string conversion to Integer

Folks Appreciate your help in understanding issue in relation to below. I need to pul uvalue from a file (tmpfile) and compare it with a number to make decision. Using #!/bin/sh contents of tmpfile : Slot uvalue : 0.16 How I am pulling it: unifval=`awk '/uvalue/ {print $4}' tmpfile` ... (1 Reply)
Discussion started by: wndgs
1 Replies

6. Solaris

No space left on device

We are using this function tmpfile() : FILE *tmpfp ; if ((tmpfp = tmpfile()) == NULL) { fprintf(stderr, "%s: ERROR: init_operator(): ", ROUTINE); perror("tmpfile()"); exit(ERR_OPEN); } and the above is raising error : MSMD0603: ERROR:... (3 Replies)
Discussion started by: atiato
3 Replies

7. Shell Programming and Scripting

optargs processing

Hello i'm writing some analyzing script and i'm giving to my program these parameters, for example: ./procinfo -r tmpfile sh -c "cat tmpfile" where -r is proccessed in getopts and it takes an argument by OPTARG.. The thing is I need to save this part to some variable: sh -c "cat tmpfile"... (4 Replies)
Discussion started by: midin
4 Replies

8. Shell Programming and Scripting

Perl - CAPTURE query

When i run script with option 1 it works, however if I assign path to variable $tmpfile and try to use that it writes to $tmpfile and not /var/tmp/abc.tmp, what am I missing? 1. open (CAPTURE, '>>tmpfile'); print CAPTURE "$T1,$T2,$T3"; close (CAPTURE); 2. my $tmpfile='/var/tmp/abc.tmp';... (10 Replies)
Discussion started by: gefa
10 Replies