473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Modify date in file with Bash Script

Hi All... I have what I thought would be a simple problem but I can't seem to find an example or pointer anywhere to solve it.

I have a simple CSV file with weather data in it.

It includes a timestamp for the data that is in UTC.

I need to convert that timestamp into local time.

Now I should be able to use sed to grab the correct data out of the file, but how can I do the math to change the date?

Thank you ever so much. Here's the file:

Timestamp,Temp,Chill,HIndex,Humid,Dewpt,Wind,HiWin d,WindDir,Rain,Barom,Solar,ET,UV
20071128 06:58:10,0.3,0.3,0.3,96,-0.2,0,3,19,0.5,1030.2 +
Nov 28 '07 #1
0 2622

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: TaeKyon | last post by:
I'm a python newbie; here are a few questions relative to a problem I'm trying to solve; I'm wandering if python is the best instrument or if awk or a mix of bash and sed would be better: 1) how...
4
by: Tom Purl | last post by:
I just wrote a Python script that is going to be called from bash script. If the Python script fails, I want the bash script to also stop running. Unfortunately, I can't seem to get that to work. ...
1
by: Michael Banjumi | last post by:
Where n is the parm reads from the file. How can I handle this without giving any syntax error and produce the desired result? TIA
17
by: Scot L. Harris | last post by:
I am running postgresql 7.2.4 on a Redhat 8.0 system. I have been looking for a way to setup another database besides the initial one setup under /var/lib/pgsql/data on a different file system. ...
2
by: shathil | last post by:
#!/bin/bash cat /var/backup/192.168.4.3/dirnum.prn | awk '{print $1}' if i put above script can read the file. #!/bin/bash file1=/var/backup/192.168.4.3/dirnum.prn exec <$file1 ...
4
by: melmack3 | last post by:
Hello My PHP script executes many bash/cmd commands. Functions like "exec()" or "system()" cause that new bash/cmd session is started, the command is executed and the session is closed....
0
by: john12345 | last post by:
Hi, I need help with the script below, the if statments are fine they work perfect. what i am looking for is getting the files from the directory /raw/ with the restriction. for example, the...
1
by: Gros Bedo | last post by:
Yes I've seen that each python script calls its own instance of Python. Buthow to know which is the good one in bash ? Is there a command that gets the parameters of process, so I could use grep to...
0
by: norseman | last post by:
Gros Bedo wrote: ============================== Yes. man ps explains try ps -AFL | grep then kill -9 found (check it more than twice) 1) If your script is known to hang use what...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.