[gradsusr] get length of file from shell in a grads function

Becker, Bernd bernd.becker at metoffice.gov.uk
Thu Feb 2 06:03:02 EST 2012


dear grads user,

how can I protect the blank at the end of this instruction?

'@ !ls -l  /project/obs1.dat | cut -f 5 -d" "'

grads reads as far as 

'@ !ls -l  /project/obs1.dat | cut -f 5 -d" 

and stops.

However, interactively  
!ls -l  /project/obs1.dat | cut -f 5 -d" "

works just fine (returns the length of the file).

Is it a fair assumption that in "@", single quotes and double quotes 
are treated as the same?

Would be nice to find a work around.
Running opengrads on a linux box :
Config: v2.0.1.oga.1 little-endian readline printim grib2 netcdf
hdf4-sds hdf5 opendap-grids,stn athena geotiff shapefile
Grid Analysis and Display System (GrADS) Version 2.0.1.oga.1
Copyright (c) 1988-2011 by Brian Doty and the
Institute for Global Environment and Society (IGES) 
This program is distributed WITHOUT ANY WARRANTY 
See file COPYRIGHT for more information. 

Built Thu Oct 27 11:50:42 EDT 2011 for x86_64-unknown-linux-gnu

Thanks for your help,
Bernd.


--
Bernd Becker   Climate Impacts Product Development
Met Office Hadley Centre    FitzRoy Road  Exeter   Devon EX1 3PB  United
Kingdom
Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
E-mail:bernd.becker at metoffice.gov.uk -
http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/
bernd-becker
http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game




More information about the gradsusr mailing list