[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Reading Particular contents from file
- From: Sandeep Ghai <sandeep.ghai92@...>
- Date: Wed, 25 Jan 2012 09:21:33 -0500
Hello everyone,
I am doing file handling using Lua programming. But I need some help where I got stuck.
I want to read particular line from the file.
consider the following file:-
problem description
title="3d Beam Sample Problem (Logan ex. 6.8, p.248)" nodes=4 elements=3
nodes
1 x=0 y=0 constraint=fixed
2 x=0 y=120 constraint=free force=side_sway
3 x=120 y=120 force=twist
4 x=120 y=0 constraint=fixed
beam elements
1 nodes=[1,2] material=column
2 nodes=[2,3] material=beam
3 nodes=[3,4] material=column
I want to read 'x',and 'y' values whenever I pass argument to read 'nodes' and similarly for other contents(like constraint,forces etc) too.
After then I want to pass all these things directly into database,to gather all the similar things from number of files.
Please help me in syntax. I am a beginner in Lua Programming.
Thank you in advance.
--
Sandeep Ghai
blog: http://sandeepghai.wordpress.com