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 LINUX
sttime
sttime(3) ShapeTools Toolkit Library sttime(3)NAME
stMktime, stWriteTime - date and time handling
SYNOPSIS
#include <config.h>
#include <sttk.h.h>
time_tstMktime (char *string);
char*stWriteTime (time_t date);
DESCRIPTION
stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is
a list of all valid formats, optional parts in brackets.
[Tue] Jan 5[,] [19]93
This includes the standard asctime(3) format.
Jan 5 With no year given, the year defaults to the current year.
[19]93/01/05 This notation requires month and day represented by exactly two digits.
5.1.[19]93 This is the usual German notation.
5.1. German notation referencing the current year.
A certain time, given together with the date must always have the following form.
hours:minutes[:seconds]
Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below
10 may be written as one digit numbers.
The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of white-
space may be given between a field of the time value and the separating colon. The time is always considered to be local time.
stWriteTime generates a time string similar to asctime(3) from its date argument.
SEE ALSO asctime(3)BUGS
Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure.
sttk-1.7 Thu Jun 24 17:43:35 1993 sttime(3)