Operating System - HP-UX
1748195 Members
4700 Online
108759 Solutions
New Discussion юеВ

How does one echo the * character ?

 
SOLVED
Go to solution
Eric Lipede
Frequent Advisor

How does one echo the * character ?

Hi there
I have a file that contains the following entries...

*********
********
****eee**

the script contains..

cat $FILEIN | while read
do
echo ${REPLY}
fi

the result of this is that output reflects the directory contents ..ie it evaluates "*". Does anyone know what the method of displaying "*" is

thks in advance.
Eric



done

Quod sum eris
5 REPLIES 5
Oviwan
Honored Contributor
Solution

Re: How does one echo the * character ?

hi

write it with quotes:
change
echo ${REPLY}
to this:
echo "${REPLY}"

you can also escape the * sign with:
echo \*

regards
Eric Lipede
Frequent Advisor

Re: How does one echo the * character ?

I tried every permutation except that one !! many thks !!!!
Quod sum eris
Oviwan
Honored Contributor

Re: How does one echo the * character ?

you are welcome.

don't forget to say thanks with hp points. also in your other threads.

I have assigned points to 0 of 22 responses to my questions.
Dennis Handly
Acclaimed Contributor

Re: How does one echo the * character ?

>cat $FILEIN | while read; do
echo ${REPLY}

You can of course cat $FILEIN directly to stdout so you don't get any interpretation:
$ cat $FILEIN
Eric Lipede
Frequent Advisor

Re: How does one echo the * character ?

Hi
cat'ing would be great (and easy)- I specifically needed to work with the output ;-)
Quod sum eris