Replaces the 1st two didigts always in field 6 against "20". Write the changed output to tmpfile and then moves tmpfile to infile, overwriting it. Maybe this is an option for you.
Hi,
I have a file named "Test_2008_01_21"
The file contains a string "manual" that occurs many times in the file
How can i find the positions of the string "manual" in the file
Ex: if the string " manual " occurs three times in the file. i want to replace the second occurance of string... (6 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT DEBIAN
explain_tmpfile_or_die
explain_tmpfile_or_die(3) Library Functions Manual explain_tmpfile_or_die(3)NAME
explain_tmpfile_or_die - create a temporary file and report errors
SYNOPSIS
#include <libexplain/tmpfile.h>
FILE *explain_tmpfile_or_die(void);
FILE *explain_tmpfile_on_error(void);
DESCRIPTION
The explain_tmpfile_or_die function is used to call the tmpfile(3) system call. On failure an explanation will be printed to stderr,
obtained from the explain_tmpfile(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_tmpfile_on_error function is used to call the tmpfile(3) system call. On failure an explanation will be printed to stderr,
obtained from the explain_tmpfile(3) function, but still returns to the caller.
RETURN VALUE
The explain_tmpfile_or_die function only returns on success, see tmpfile(3) for more information. On failure, prints an explanation and
exits, it does not return.
The explain_tmpfile_on_error function always returns the value return by the wrapped tmpfile(3) system call.
EXAMPLE
The explain_tmpfile_or_die function is intended to be used in a fashion similar to the following example:
FILE *result = explain_tmpfile_or_die();
SEE ALSO tmpfile(3)
create a temporary file
explain_tmpfile(3)
explain tmpfile(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_tmpfile_or_die(3)