Passing values in expect package

i am having specific number of input( as per o/p of another script) say 10
like d1,d2,d3....d10
i want to pass these o/p to expect script.But i don't know how to do that

the the input to the expect script should be like this

/expect_script.exp $d1 $d2......$dn

as this "dn" depends in user input.i am not getting how to pass it to expect package.

You can ask user to enter inputs like this.

echo "Please enter 10 inputs separated by space , followed by [ENTER]:"
read Input

And then just process on Input..

but values are changing on daily basis depending on date

Every time you run that script it will ask user to enter inputs.. so no need to think on this issue. :slight_smile:

this script is very bulky and have to run on approx 800 routers to get some ftp data.and have to create combine report
hence its so complected for me to write is as i a writing this much big shell first time
i ll provide u the logic hope you can check it out....

if we will schedule this script weekly.....do it will create and change,as dates in every month will be varying.....

Sagar please elaborate on your question and input data. What you want to exact?
And we can schedule this script as you want from crontab. if not possible to use crontab then we can schedule it by using script only. Just clarify on your input and actual script work.

thanks pamu for helping me .....

lets take an example

there are four groups SAM ROBERT HOLDER each are having four FTP servers under it and 50 files are transferred daily.

hence we have to create a report that how many files are transferred on daily basis for that we have to telnet them and list the files ( listing file format is "ls nc*010412* | wc -l") and grep that output to convert in CSV
and output should be like this
(date will be changing every month and number of columns will be changing depending on date entered)

date  01-04-12  02-04-12 03-04-12 04--4-12.................31-04-12  total_expected total_available
sam1      50         50        50     50       .................50
sam2      43         50        41     50     ..................50
sam3
sam4

likewise with ROBERT1,2,3,4 and HOLDER 1,2,3,4