Your tac code changes the time on the entry before but it doesn't also change the date.
So for the text it reads:
Instead of having 10/28/2013 20:20:28. It's definitely a faster approach but it's missing the date too. I'm not familiar with tac, how would you add in the date element to it? Also the change to close statement to be 12/31/2500 only changes the very last entry, but I would like it to change the very last entry for each station that it runs through. In the example text there is only one station but in the full text file there are many more. Ideas?
And thanks for the help!
Moderator's Comments:
Please use CODE tags and stop depending on site administrator's to fix your posts for you.
Last edited by Don Cragun; 11-23-2013 at 04:26 PM..
Reason: Add CODE tags.
New to sed...
Have a file foo.txt (below).
Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique).
So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line.
What I have thus far:
sed -e... (6 Replies)
Lets say I have file.txt:
(Product:Price:QuantityAvailable) (: as delimiter)
Chocolate:5:5
Banana:33:3
I am doing a edit/update function.
I want to change the Quantity Available, so I tried using the SED command to replace 5, but my Price which is also 5 is changed instead.
(for the Banana... (13 Replies)
Hi,
I need help on replacing values in certain field in my file1.txt based on matched patterns in file2.txt using awk.
The blue color need to match with one of the data in field $2 in file2.txt. If match, BEGIN and FINISHED value in red will have a new value from field $3 and $4 accordingly.... (3 Replies)
I have a csv file in which i have to search a particular string and replace the data in any column with something else. How do i do it using awk.
file
------
2001,John,USA,MN,20101001,29091.50,M,Active,Y
2002,Mike,USA,NY,20090130,342.00,M,Pending,N... (3 Replies)
Hi,
I have a file like this-
aa
12
23
34
aa
21
34
56
aa
78
45
56
I want to print out only the lines after the last aa. How do I do this? I tried using grep -A and sed -n, but both didnt work as I wanted to.
Could someone help me out please.. (3 Replies)
Hello All
I am struck in the issue which I want to share with all of you.
What I am trying to do is For every line in a file I have to replace a particular character from the given character in a file
For Example
Suppose the data is
1111x2222
1111x2222
2222y3333
1111x2222
I... (4 Replies)
Hi Friends,
I have looked around the forums and over online but couldn't figure out how to deal with this problem
input.txt
gene1,axis1/0/1,axis2/0/1
gene1,axis1/1/2,axis2/1/2
gene1,axis1/2/3,axis2/2/3
gene2,axis1/3/4,axis2/3/4
Match on first column and if first column is... (1 Reply)
friends I am struck in a situation where I need to comment a line start with space as below in a file
root@LOCALHOST * rw
LOCALHOST* r
I should comment second line only
Any help please (16 Replies)
I have a situation where a file "config.txt" looks like this
Servername:
OS:
Serername:
OS:
Servername:
OS:
....
....
...
Servername:
OS:
looking for the sed syntax to replace the "Nth" occurrence of Servername (i would apply the same logic to OS as well), want to replace the Nth... (4 Replies)
Hi,
I need a ksh script to replace indirect directory references in an .ini file with a env variable using sed or awk.
The .ini file is for example as such:
A=..
B=../
C=../..
D=../../
E=../bin
F=../../bin
G=../../bin/xml
H=../../bin/xml/
Need to replace an instance of .. or... (2 Replies)
Discussion started by: andyatit
2 Replies
LEARN ABOUT DEBIAN
sensor
Sensor(3I)Sensor(3I)NAME
Sensor - describe input interest
SYNOPSIS
#include <InterViews/sensor.h>
DESCRIPTION
A sensor specifies a set of input events to catch.
PUBLIC OPERATIONS
Sensor()
Create a new sensor that initially will not catch any events.
virtual void motion(boolean)
Specify the sensor should (parameter is true) or should not (parameter is false) catch pointer motion events.
virtual boolean motion()
Return whether the sensor is catching pointer motion events.
virtual void key(boolean)
Specify the sensor should (parameter is true) or should not (parameter is false) catch keyboard events.
virtual boolean key()
Return whether the sensor is catching keyboard events.
virtual void button(boolean, PointerButton = Event::any)
Specify the sensor should (parameter is true) or should not (parameter is false) catch button events. The pointer button may spec-
ify a particular button or Event::any (meaning all button events).
virtual boolean button(PointerButton = Event::any)
Return whether the sensor is catching button events. The pointer button may specify a particular button or Event::any (meaning any
of the buttons).
virtual boolean caught(Event&)
Return whether the sensor is catching the given event.
void Catch(EventType)
Express interest in a particular type of event. This function is provided solely for backward compatibility and will be removed in
a future version.
void CatchButton(EventType, int)
Express interest in a particular type of button event for a specific button. This function is provided solely for backward compati-
bility and will be removed in a future version.
void Ignore(EventType)
Remove interest in a particular type of event. This function is provided solely for backward compatibility and will be removed in a
future version.
void IgnoreButton(EventType, int)
Remove interest in a particular type of button event for a specific button. This function is provided solely for backward compati-
bility and will be removed in a future version.
SEE ALSO Event(3I)InterViews Reference ManualSensor(3I)