passing a command line argument

I have a shell script which does the encryption of a file where i am passing the file name as a command line argument,but later on the script waits on the screen to enter Y or N
what is the command i should be using on the shell script

#!/bin/bash -x

outfilename=file.out

echo "**********************************" >> $outfilename 2>&1

cd encrypt_files/
"encrypt the file command" $1

read_line $2 ( does this work)
HERE IT WAITS FOR ME TO ENTER Y/N how do i pass it here

echo "*********************************" >> $outfilename 2>&1

Depending on what your logic is for Y or N:

You can read in a file with Y or N

read input < ./my_Y_file

I'm sure some of the gurus here should have a better solution than reading the variable from a file. But it works.

Rudoraj,
Here is one way of doing:

...
echo "Enter value:"
read mInputValue
echo "You entered: "$mInputValue
...

I think I am confusing everybody...

I want to automate the process ..so
When I run the shell script, I know it will wait for the user input.
since this might run at night, there might be noone to input, so i want to pass it along with command line itself, so when it asks for user input, it takes the parameter passed on the command line.....

how is it possible.

Thanks

...
if [ "$1" = "" ]; then        ## No parameters were entered
  echo "Enter value:"
  read mInputValue
  echo "You entered: "$mInputValue
else
  mInputValue=$1
  echo "The input parameter was "$mInputValue
fi
...

To run the shell with parameter:

my_shell my_parameter

To run the shell to prompt:

my_shell

Try:

echo Y | script

>>...
>>if [ "$1" = "" ]; then ## No parameters were entered
>> echo "Enter value:"
>> read mInputValue
>> echo "You entered: "$mInputValue
>>else
>> mInputValue=$1
>> echo "The input parameter was "$mInputValue
>>fi
>>...

here once I enter the $1 parameter,
the command that i run in the script is asking me for confirmation (user input) ( y or n)
in order to run successfully, i have to enter y at the prompt( manually).
so to avoid the manual entry ...

how do i avoid the prompt and give "y" in the script itself

Rudoraj,
As Solfreak posted, to avoid the prompt:

echo "Y" | your_shell

Pipe the input to the script:

printf "%s\n" "$PARAMETER" | /path/to/script