How to read lines from a flat file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to read lines from a flat file
# 1  
Old 09-28-2006
How to read lines from a flat file

i have some commands written line by line in one flat file
i have to read each linefrom this file(file name passed as parameter)
and then i have to execute this
How can i do it?

Last edited by bihani4u; 09-28-2006 at 02:52 PM..
# 2  
Old 09-28-2006
DUPE. There is no need to cross-post!
# 3  
Old 09-28-2006
sorry for this? But i stuck in this..I am new to shell scripting pls help me out..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Read a flat file, evaluate and create output. UNIX SCRIPT.

Hi all, I have a flat file as below; 470423495|1||TSA-A000073800||1|||1 471423495|1||TSA-A000073800||5|||5 472423495|1||TSA-A000073800||2|||7 473423495|1||TSA-A000073800||3|||3 I like to create a Unix script. The script have to valuate the last two columns, if the values are... (4 Replies)
Discussion started by: mrreds
4 Replies

2. Shell Programming and Scripting

Read from Multiple character delimited flat file

Hello Guys I have a multiple character delimited flat file "|~|". when I tried to read the data the "|" character also coming Example I/P file 9882590|~|20111207|~|K03501000063005574033961|~|K|~| Command to get the second column I used awk -F"|~|" ' {print $2}' ... (2 Replies)
Discussion started by: Pratik4891
2 Replies

3. Shell Programming and Scripting

perl: Read array from a flat file

Hello Guru's I want to read an array into a flatfile Please let me know how to do the same So far this the below code use strict; use warnings; open (my $data , '<', $ARGV)|| die "could not open $ARGV:\n$!"; my @array=(<$data>); my @sorted=sort... (8 Replies)
Discussion started by: Pratik4891
8 Replies

4. Shell Programming and Scripting

Read flat file upto certain number of columns

Hello Guys Please help me with the below issue I want to read a flat file source upto certain number of columns Say my flat file has 30 columns but I want to read upto 25 columns only How come the above issue can be addressed? Thanks a lot!!!! (1 Reply)
Discussion started by: Pratik4891
1 Replies

5. Shell Programming and Scripting

To read a flat file containing XML data

I have a file something like this:aaaa.xml content of the file is 0,<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <storeInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <s> <BRANCH_NO>3061</BRANCH_NO> <BRANCH_NAME>GREEN EXPRESS</BRANCH_NAME> ... (4 Replies)
Discussion started by: kmanivan82
4 Replies

6. Shell Programming and Scripting

How to read the first column in a flat file with ~ as delimiter

I have one flat file like below id1~col~batch1 id2~col2~batch2 id3~col3~batch3 I need to read the first column one by one and I need to write one db2 query based on that column1 Like for (i=0;i<=10;i++) do insert into table column (con_id) values (select column from table where... (4 Replies)
Discussion started by: siri_886
4 Replies

7. Shell Programming and Scripting

how to read fixed length flat file....

Hi Gurus, Thanks in advance... I am new to writing shell scripting and help me out reading a flat file with fixed length. I have a fixed length flat file with storename(lenth 6) , emailaddress(lenth 15), location(10). There is NO delimiters in that file. Like the following str00001.txt... (2 Replies)
Discussion started by: willywilly
2 Replies

8. Shell Programming and Scripting

Deleting lines in a flat file

Hi Friends I have a flat file which has sentence like "Notice generated". It can be anywhere in the flat file. What I want to do is, I want to delete all the lines which are above sentence "Notice generated". How can I do it. Kindly advice. Anushree (5 Replies)
Discussion started by: anushree.a
5 Replies

9. Shell Programming and Scripting

remove specific lines from flat file using perl

Hi, Here is wat im looking for.. i have a flat file which looks like this.. 00 * * * * .. .. * * text text text COL1 COL2 ----- ----- 1 a (12 Replies)
Discussion started by: meghana
12 Replies

10. Shell Programming and Scripting

merge multiple lines from flat file

Hi, I have a tab delimited flat file like this: 189 Guide de lutilisateur sur lappel conférence à trois au moyen d'adaptateurs téléphoniques <TABLE><TBODY><TR><TD><DIV class=subheader>La fonction Appel conférence à trois </DIV></TD> \ <TD><?php print $navTree;?> vous permet de tenir un appel... (4 Replies)
Discussion started by: hnhegde
4 Replies
Login or Register to Ask a Question