Help Me Pls Its Urgent!!!!!!!!!!!!!!!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help Me Pls Its Urgent!!!!!!!!!!!!!!!!
# 1  
Old 03-11-2013
Oracle Help Me Pls Its Urgent!!!!!!!!!!!!!!!!

Hi,
These are the text file I have

//input1.txt//
cd dir1/dir2/pg1.txt
cd dir3/dir4/pg2.txt
cd dir88/dir5/pg4.txt
cd dir7/dir6/pg5.txt
cd dir8/dir9/pg7.txt

And each text file has some text.

Now I have to write a shell script which reads input1.txt and changes the directory as shown in each line and reads pg1.txt and then copy it to another file namely out.txt. This has to be done recxursively. The code which i Have written is
Code:
#!/bin/ksh
 if [ $# -ne 2 ]  # enter the input data file and output file
 then
 echo "Please enter 2 filenames" 
 fi
 infile=$1
 outfile=$2
 while read line
 do
  #read the path of a file and change the path
  cd $line 
  while read line # now reads the file pg1.txt 
  do
   echo "$line" >> $outfile
  done< $line
 done < "$infile"

Here I am able to put data of pg1.txt in out.txt but other files I am not able to do it...Pls help me.....
# 2  
Old 03-11-2013
Everyone at the UNIX and Linux Forums gives their best effort to reply to all questions in a timely manner. For this reason, posting questions with subjects like "Urgent!" or "Emergency" and demanding a fast reply are not permitted in the regular forums.

For members who want a higher visibility to their questions, we suggest you post in the Emergency UNIX and Linux Support Forum. This forum is given a higher priority than our regular forums.

Posting a new question in the Emergency UNIX and Linux Support Forum requires forum Bits. We monitor this forum to help people with emergencies, but we do not not guarantee response time or best answers. However, we will treat your post with a higher priority and give our best efforts to help you.

If you have posted a question in the regular forum with a subject "Urgent" "Emergency" or similar idea, we will, more-than-likely, close your thread and post this reply, redirecting you to the proper forum.

Of course, you can always post a descriptive subject text, remove words like "Urgent" etc. (from your subject and post) and post in the regular forums at any time.


Thank you.

The UNIX and Linux Forums
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pls help me very urgent

will post again (1 Reply)
Discussion started by: revertback
1 Replies

2. Shell Programming and Scripting

Pls Help me.. soon. Very urgent

I have downloaded the Putty SSH configuration. I have entered my Host name as illinois.engr.sjsu.edu and i am trying to save that. But i am unable to save. Also i opened the session and entered my log in name But it says using keyboard interactive authentication.I am not able to get into $ ... (2 Replies)
Discussion started by: VamsiVasili
2 Replies

3. UNIX for Dummies Questions & Answers

URGENT :pls help

Following is d code snipet #!/bin/ksh retVal=`sqlplus -s user/passwd\@oracle_sid <<EOF SET SERVEROUTPUT ON SIZE 100000 DECLARE STATUS_VALUE VARCHAR2(1); BEGIN SELECT temp1 INTO STATUS_VALUE FROM sai; DBMS_OUTPUT.PUT_LINE(STATUS_VALUE); END; / exit; EOF` echo "Return Value... (2 Replies)
Discussion started by: sainathdeg
2 Replies

4. Shell Programming and Scripting

If not working...pls help:URGENT

Following is d code snipet #!/bin/ksh retVal=`sqlplus -s user/passwd\@oracle_sid <<EOF SET SERVEROUTPUT ON SIZE 100000 DECLARE STATUS_VALUE VARCHAR2(1); BEGIN SELECT temp1 INTO STATUS_VALUE FROM sai; DBMS_OUTPUT.PUT_LINE(STATUS_VALUE); END; / exit; EOF` echo "Return Value... (4 Replies)
Discussion started by: sainathdeg
4 Replies

5. Solaris

lex on solaris??? (urgent, pls!!!)

Hi everyone, I would like to know how to compile and run lex programs on solaris 10. the conventional way is $ lex <name.l> $ cc lex.yy.c -ll $ ./a.out but while trying to execute the 2nd command :i get a reference saying that the command is old or that main is not supported... Hence... (1 Reply)
Discussion started by: wrapster
1 Replies

6. Shell Programming and Scripting

Pls Help.. Really Urgent

Hi, I am creating a pipe in a directory $HOME/pipes. The pipename should be L${PROGNAME}. Whenever i embed these lines in shell script, i get an error mkfifo: No such file or directory. I am creating a pipe with the key word mkfifo $HOME/pipes/L${PROGNAME}. Please help me how to get... (5 Replies)
Discussion started by: raghavan.aero
5 Replies

7. UNIX for Dummies Questions & Answers

CAn any1 help me pls...urgent need to pass up this monday

CAn any1 help me pls...urgent need to pass up this monday my assigment..... im new bird at unix so pls help me.... can any1 help me answer this question? 1a.What are the different type of shell available in UNIX. b.How to know which shell you are currently used? c.How to change the... (1 Reply)
Discussion started by: yeah016
1 Replies

8. UNIX for Dummies Questions & Answers

Crontab - URGENT pls

I put 30 2 * * * /usr/bin/tar cvf /dev/rct0 /u/csa/* in my crontab file (SCO5) but I want to be absolutely sure that the backup job finishes successfully. I know that whenever cron cannot execute a command sends an e-mail to root with the error code and/or an explanation of the problem. ... (6 Replies)
Discussion started by: pappous
6 Replies
Login or Register to Ask a Question