Please write a script for me

Hi All, need one help
Suppose there are two files-
1)Input files-:

path1/given/to/file | File1
path2/given/to/file | file 2

etc
Note- I use "|" as variable separator.
2) Target files-
I want to fetch data from file1 and use in below command-:

cd /path(from 1st file)
ls -ltr
If file(From 1st file) present
echo File is present
else
file not present.

same continue for all rows.

Can any one please help me to do this script please.

Hi Shubham,

Welcome to the unix.com forums!

Please open a new thread for your problem and do not add to existing threads. Furthermore please read the forum rules(See here: UNIX and Linux Forums - Smilies) how to create a request that get's you the help, which supports you most. Your request needs quite a bit more attention before others can help you wisely.

Regards,
stomp

Hello Shubham,
Is this a homework assignment?

Homework and coursework questions can only be posted in this forum under special homework rules.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

If this is not a homework assignment, please explain what you are working on that needs this to be done.