---------- Post updated at 12:37 ---------- Previous update was at 12:36 ----------
If your header line will not always contain the literal word Header, then the previous solution will not meet your requirement and you will want to check this sed approach:
Hi,
I am a newbie to shell scripting, and I have a file which quite large which I would like to delete lines at certain places. I want to search for a keyword which is recurring in the file. When matched I would like to delete the line. And when the file was so huge I thought I ought to learn... (3 Replies)
Hi All,
I have a file with 3 columns (Bank Name, Account Number and Amount). My requirement, I need to delete lines using Unix Shell script:
1. Which are having Alphanumeric characters in Account Number (eg. Line3).
2. Which are having 0.00 in amount. (eg. Line4)
3. And also I need to... (4 Replies)
Hi Experts,
I have a file format as mentioned below. I would like to have unix script (HP Unix) which can:
1. Remove first 6 and last 3 lines.
2. Delete the lines where 3rd column having Alpha Numeric Number
3. Delete the lines where 4th column having 0.00
4. Calculate the sum of all the... (16 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Hi
Iam having file like below
10.238.52.65 pun-ras-bng-mhs-01 server
10.238.52.65 pun-ras-bng-mhs-01 10.10.10.10
10.238.52.65 pun-ras-bng-mhs-01 10.10.20.10
10.238.54.1 enk-ras-bng-cse-01 server
10.238.54.1 enk-ras-bng-cse-01 10.10.30.10
10.238.54.1 enk-ras-bng-cse-01 10.10.10.10
... (5 Replies)
Hi Guru's
The script has to read an entry from one file and delete the set of lines form other file. Below is the format of the file. In the below example, script should read the entries from input file 2 and delete the entries from input file 1.
Input file 1
cn: test@test1.com
abc:... (7 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies
LEARN ABOUT OSF1
tmpfile
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)