• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading from a file and adding it to array using ksh...  RSS feed

 
senthil sen
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a list of URL's or URI in a file.
I need to check that each URL or URI or the files exist

example : /usr2/user/direct/file.ksh
/usr2/user/mdirect/file.ksh
/export/user/file.ksh
.....................
.....................

I save this in a file called list.txt

Here I need to check the each path and the file does exists, once its
is done I need to put them in a array variable and then later display
it.

Can anyone help me out on this..
I am going to try this out in KSH.

Thanks in advance
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This bash-script checks for files found in a list.
It doesn't use an array, and bash instead of ksh.
Perhaps ksh is similar?

There is a great bash-tutorial - including arrays - here:
http://www.tldp.org/LDP/abs/html/

hope it leads you a step forward...
[ December 18, 2004: Message edited by: Stefan Wagner ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!