Re: To replace characters in a string

From: Gus Correa <gus_at_nyahnyahspammersnyahnyah>
Date: Wed May 16 2012 - 14:20:13 MDT

On 05/16/2012 04:06 PM, Noel Aloysius wrote:
> Hello,
>
> I am writing a script to convert several flat binary files to netCDF
> binaries. The list of files within a folder are returned as follows,
>
> fin = systemfunc("ls " + diri + "*xxx-yyy_bc.bin")
>
> I want to create the output file names (fout) by replacing ".bin" with
> ".nc"
>

Something like this, perhaps?

fout=systemfunc("cd " + diri + "; ls *xxx-yyy_bc.bin | sed
's/\.bin/\.nc/' ")

Gus Correa

> Appreciate your suggestion,
>
> Thanks,
> Noel
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 16 14:20:28 2012

This archive was generated by hypermail 2.1.8 : Thu May 17 2012 - 13:42:02 MDT