Finding input within a script

I need to find the amount of information entered from within my script and I'm a bit stumped.

If the information was entered from the command line I could easily use the $# feature.

I figure I would need to do something like this to create each variable

wc -w | var1=$(cut -f1)

How would I tell the script to do that on the line that the user enters (keeping in mind that they only enter one line of information)

If people could give me some insight it would be greatly appreciated

Maybe this will help:

$ cat ll
#! /usr/bin/ksh
IFS="" read "line?enter a line - "
echo you entered: "$line"
echo it has ${#line} characters
exit 0
$ ./ll
enter a line - This is a line.
you entered: This is a line.
it has 15 characters
$

how would that translate into the bash shell?

i guess i should have mentioned thats what im coding in

Nevermind, I got the answer...had a brain fart

Thanks for your help :slight_smile: