[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

960916: using netCDFPerl to modify filenames in netCDF dataset



Elias,

> To: address@hidden
> From: address@hidden (Elias Diab)
> Subject: Perl question
> Organization: .
> Keywords: 199609161504.AA04001

In the above message you wrote:

> I have some files, in which exist some ( too many !) links to other files !
> the format of these links is: filename.xxx.html and I want to substitute
> all these filenames to the following format: filename.html and after
> that,instead of .html I want to have .htm in all the files !
> What is the substitution command to do that, please ?
> I'll write down for you this example, to make it clear for you:
> 
> 
> let's suppose this is the content of one of the files that I have:
> 
> <h2>
> <li>
> <a href="tw5cc010.ctl.html"> Temp data: APS control system </a>
> </h2>
> 
> So, instead of tw5cc010.ctl.html ,I need to have tw5cc010.html and than
> tw5cc010.htm , and so on for the rest thousands links !
> 
> Can you please help me to do this ?
> Maybe, it's very simple, but I don't have any idea about Perl !!!!

Rather than create a netCDFPerl script to do the above, I'd probably
just use the netCDF ncdump(1) utility to convert the netCDF file into a
formated file, then use something like the UNIX sed(1) utility to
perform the substitutions, and the convert the file back into a netCDF
file via the netCDF ncgen(1) utility.

Please let me know if this helps.

--------
Steve Emmerson   <address@hidden>