C Shell Script query

Hi

I need a small help

Cshell% more abc.txt
********
Cshell% cat abc.txt | cut -c1-3


Cshell%set test3=`cat abc.txt | cut -c1-3`
Cshell%echo $test3
a.txt b.txt.................
.....
It displays all the file in the current directory.

I want *** to be displayed.

Can any one of you provide a quick suggesstion in this ?

The shell is interpreting the contents of the env var - in this case it's '***' which is translates to "All files in the cirrent directory" :slight_smile:

Try echo "$test3" instead (ie escape it)