File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes help on awk or sed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "help on awk or sed" Watch "help on awk or sed" New topic

help on awk or sed


Joined: Jan 11, 2002
Posts: 1
Hi to all,
I need to relese a script by today itself. please help me to do this.
I have a big file lets say 65 thousand lines. it is a tab seperated text file. i need to add one more columne at the end of every line ( tab seperated). the value of that column is the first column of the first line.
Output file
here '^' represent tab character.

please help me ASAP.
vivek S.
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

awk is the better tool for this. sed works with lines as addresses; awk can recognize words on the line more effciently.

That's all you need. Then turn on the execute bit for this file and run it as a program:
$ rex {data_file}
That should do it.

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
I agree. Here's the link:
subject: help on awk or sed
It's not a secret anymore!