[Thread Prev][Thread Next][Index]
Re: [ferret_users] spawn command gawk string arrays
Patrick,
I do this kind of thing to get text from a spawn command into a variable. The resulting variable, num_files, is the number of lines in the operating system file file_list.txt.
let num_file_string = {spawn:"wc -l file_list.txt"}
let num_files = strfloat( substring( num_file_string, 0, 8) )
where file_list.txt is an operating system file containing a list of file names, and strfloat is a ferret command.
------------------------------------------------------------------------------------------
Edward D. (Ned) Cokelet, Ph.D. Oceanographer
NOAA/PMEL off: (206) 526-6820
7600 Sand Point Way NE fax: (206) 526-6485
Seattle, WA 98115-6349
Edward.D.Cokelet@xxxxxxxx
The contents of this message are mine personally and do not necessarily reflect any position of the Government or the National Oceanic and Atmospheric Administration.
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement