Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am facing some problems in replacing the value of a variable in a html tag in a unix box. Here are the details. Please help me in finding a solution.




echo "$line"

I am expecting the output to be <td>5</td> but I am getting the output as <td>$count</td>.

I tried a lot to solve this but couldn't :(

share|improve this question
Your likely problem is that ksh doesn't do variable expansion the same way bash does. – Shadur Sep 23 '11 at 9:43
The script you posted does output <td>5</td>. Did you copy-paste the right script? How are you running it? – Gilles Sep 23 '11 at 21:55

I'm not an expert on ksh but according to the documentation, the following should work (if slightly clunky):

echo -n "<td>" 
echo -n ${count} 
echo "</td>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.