It's not a secret anymore!
The moose likes Java in General and the fly likes How to read the following text file using shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to read the following text file using shell script" Watch "How to read the following text file using shell script" New topic
Author

How to read the following text file using shell script

Ashok kolasani
Greenhorn

Joined: Oct 10, 2009
Posts: 3
Hi ,
How can I read the text file using shell script.

File content looks like this

PATCH NAME = TEST
FILES AFFECTED = status.ear,sms.war,auto.jar,kat.ear
DB = True

Now I want to read above file and store them into variables then print them on console.
Can anyone help me??Thanks in advance.....



Ashok kumar
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
This place http://www.coderanch.com/forums/f-13/Linux-UNIX is better for your question.

Anyway, could you tell what you've already done and what exactly it is that you're having trouble understanding?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Take a look at java.util.Properties and its load methods.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to read the following text file using shell script
 
Similar Threads
Unix scripting question - Reading directories
File Encryption
JAVA API ( JPS ) For Printing out in JAVA
what shell is this
Problem in Executing .exe file using Script