2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 889
/ 2 Years ago, fri, may 20, 2022, 10:33:59
I am trying to write a CSH script that will look at components of the filename to generate a date/time. The problem is, I have no idea how to extract part of a filename to use it. Here is a sample filename:
nam_218_20140126_1800_001.grb
20140126
is the date portion of the filename and 1800
is the time. I need to extract it and convert it to 2014-01-26_18:00:00
for use in an environment variable. Any hints?
Thanks
More From » scripts