|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
assignment of data
Hi All,
First posting on this forum. I am experiencing a scenario which I try to describe here. Input is a multiline file (actually an xml file), out of which space delimited data fields are extracted using Line 1: for i in `cat file_name` Line 2: do Line 3: var="`echo $i`" Line 4: echo $i >> temp_out Line 5: done if the data field contains something like "2245123<stringchars", line 3 comes up to var="`echo 2245123<stringchars`" which fails... due to possible redirection confusions (that's what I think). My question is, if this is the problem, this should happen always, I mean with all kinds of input data files having such data field combinations. But its not. Its occuring very inconsistently. Some input files with similar situations are failing at this line and some are not. Any guesses... Pls... Expecting some guidence... regards raghav.. |
|
#2
|
|||
|
|||
|
Are you using $var later in your code? If not, remove line 3. Otherwise, replace line 3 with:
Code:
var="$i" Last edited by zakj : July 9th, 2003 at 03:20 PM. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > assignment of data |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|