Need urgent help for reading file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need urgent help for reading file
# 1  
Old 04-03-2008
Need urgent help for reading file

Hi,

I am new to shell scripting.

I have one .txt file whose name is status.txt

Now i want to read the contents of this file in a variable.

status.txt file contains the following input

1.xml
2.ps
3.pdf


now i want to read this status.txt file. Can anybody please help me to write a script so that i will be able to read the value of status.txt and store it in a variable.
# 2  
Old 04-03-2008
No help for you. Search the forums. You have done absolutely no work, so you probably won't find anyone to help you.

This kind of thing has been asked and answered many times, so if you don't want to show that you have put forth effort, then you have to search for the answer yourself.

In the future, showing code you have written will help you get a more helpful response.

ShawnMilo
# 3  
Old 04-04-2008
Hi ShawnMilo,

Thanks for your reply. But as i don't have the time to search so i posted the add for this.

Anywhy sorry for this
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh Script, Reading A File, Grepping A File Contents In Another File

So I'm stumped. First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes. I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies

2. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

3. UNIX for Dummies Questions & Answers

[URGENT] Determines a file is a NORMAL text file

I assign the variable name=`find . -type f | awk -vR=$num '{if (NR == R) {print; exit}}` which returns the name of a file in "$num" ordered in the folder to the variable $name. I want to use IF and determine if the file is a NORMAL text file (does not contain an extension), the command will... (1 Reply)
Discussion started by: suyaku92
1 Replies

4. Shell Programming and Scripting

Help Reading XML files in Python: Urgent

OK so my objective is to create a python program that will parse an XML file(input.xml), then the program will create an mxml(output.mxml) file. In the program (.py) i need to read between CDATA so that I would get an output the CDATA code in the input.xml INPUT.XML <!]> ... (2 Replies)
Discussion started by: dcfivesixfive
2 Replies

5. Shell Programming and Scripting

URGENT HELP NEEDED ON -File size reading

All Expert, I am using Sun OS 5.8 and Perl version 5 in One server and Perl 5.8 in another unix server. I am able to read a file using fopen function of perl --file size having more then 3 GB of data.(In the machine where Perl 5.8 install) But when i am running the same perl script --It... (1 Reply)
Discussion started by: jambesh
1 Replies

6. UNIX for Advanced & Expert Users

Urgent-reading a variable value

Hi, I have a text file in which , I have contents like t1=abc t2=xyz t3=awe ...... I am able to read contents of these variables in a script by . /temp.txt echo $t1 Now, what my requirement is something like this a="t" i=1 echo $a$i --->this is displaying t1 (3 Replies)
Discussion started by: kaaakrishna
3 Replies

7. UNIX for Advanced & Expert Users

Urgent-Reading eval result in a variable

Hi everyone, I do have the requirement to store the value of below result in a variable eval echo $a Please .... Help me , it's urgent to my sript Thanks in advance... (1 Reply)
Discussion started by: kaaakrishna
1 Replies

8. Shell Programming and Scripting

[Urgent]how to print the file names into a txt file???

HI, I have a folder with some 120 files...i just want to print all the file filenames(not the content or anything else) onto a file say .txt. please help me with this command Thanks a lot. (15 Replies)
Discussion started by: kumarsaravana_s
15 Replies

9. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
Login or Register to Ask a Question