[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: unstring with Tab delimiter



> I'm trying to unstring data that uses Tab as it's delimiter.  (The data
> originally came from Excel so I don't have much choice about the
> delimiter).  I can't seem to figure out the exact syntax to put a tab in
> the delimiter with the unstring command.  I've tried actually typing a tab
> between quotes and without quotes.  I've also tried [Tab] and {Tab} both

You can use either "encode" or "chr" to put a tab into a variable, and then
use the variable in the unstring.

That is, say
  encode '<9>' into $tab
or
  let $tab = chr(9)

and then say
  unstring $line by $tab into $col1 $col2 $col3
or whatever.


                                                Nathan
----------------------------------------------------------------------------
Nathan Treadway    | Ray Ontko & Co. | info@ontko.com (auto-reply server)
nathant@ontko.com  | Richmond, IN    | ftp.ontko.com, http://www.ontko.com/