Re: To replace characters in a string

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed May 16 2012 - 14:13:13 MDT

Hi Noel,
Use stringtocharacter:
http://www.ncl.ucar.edu/Document/Functions/Built-in/stringtocharacter.shtml
grab the characters you want, then use charactertostring:
http://www.ncl.ucar.edu/Document/Functions/Built-in/charactertostring.shtml
to create the new filename(s)...
Adam

On 05/16/2012 02: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"
>
> Appreciate your suggestion,
>
> Thanks,
> Noel
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

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

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