This is an extremely confusing and subtle question. It is very easy to get this wrong.
First the dollar sign works differently in
sed depending on where it appears.
sed '$d' < /etc/passwd
will print the contents of /etc/passwd, all except the last line. That is an example of $ being used as a line number.
On the other hand:
echo box |
sed 's/.*x$/something/'
echo boxes |
sed 's/.*x$/something/'
shows the dollar sign anchoring an expression.
But to act as an anchor, the dollar sign must appear as the last character in the expression. Otherwise it becomes a regular character:
echo '$$$$$$$$' |
sed 's/$*/something/'
Now in all of these examples, the
sed command was enclosed in single quotes. That is not the case in the question. Thus the shell will see $* and probably replace it. Exactly what will happen depends on the shell and the context. I am using ksh:
set one
echo $*
echo one |
sed s/$*/something/
The final command will print "something".