10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Is there a way to find out the line number from where the data starts?
like if the data contains column header, irrespective of the text in the column header we should get the line number from which contains the column header.
I am sorry if I haven't explained the problem clearly.
... (8 Replies)
Discussion started by: kedar_laveti
8 Replies
2. Shell Programming and Scripting
Hi,
I have a tab delimited flat file, for example shown below
Name Desg Loc
a b c
d e fI want to insert an empty column inbetween the column Desc and Loc, the result should be like shown below:
Name LName Desg Loc
a b c
d e ... (6 Replies)
Discussion started by: sampoorna
6 Replies
3. Shell Programming and Scripting
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. UNIX for Dummies Questions & Answers
We receive a file which usually has 40 to 50 million rows. I want to set up an audit process by which everytime we receive a file we audit it for # of rows and total number of columns.
So if the # of rows is around 1 million on a particular day, I want to raise a flag or send an email....and if... (3 Replies)
Discussion started by: priya33184
3 Replies
5. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
6. Shell Programming and Scripting
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
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. UNIX for Advanced & Expert Users
Hi,
Recently i did some code changes in one of the text file.
During the code review,i've been asked to allign the comments
in this file to XYZ columns(say XYZ=40).
Now the problem is that this file is a huge one and
it would be really pathetic if i go ahead and do it manually.
I think... (1 Reply)
Discussion started by: amit4g
1 Replies
9. Shell Programming and Scripting
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? (2 Replies)
Discussion started by: bihani4u
2 Replies
10. Shell Programming and Scripting
Hi All,
I have used this forum many times to solve my many scripting problems. This time, I would like to seek some answers to a problem that I've been head scratching quite a bit on.
My Example:
I am converting a 2000-byte file into a 300-byte file
this file has no delimiters and hardly any... (3 Replies)
Discussion started by: oott1
3 Replies