BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 2nd, 2003, 05:15 AM
raghu20 raghu20 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 raghu20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 21 sec
Reputation Power: 0
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..

Reply With Quote
  #2  
Old July 9th, 2003, 03:18 PM
zakj zakj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 52 zakj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 41 sec
Reputation Power: 6
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > assignment of data


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway