How to replace the empty place with next line content in shell script
<pre><code>1,n1,abcd,1234 
2,n2,abrt,5666
 ,h2,yyyy,123x
3,h2,yyyy,123y
3,h2,yyyy,1234
 ,k1,yyyy,5234
4,22,yyyy,5234
</code></pre>

<p>the above given is my input file abc.txt , all I want the missing first column value  should fill with next row first value.
example:</p>

<pre><code>3,h2,yyyy,123x
3,h2,yyyy,123y
</code></pre>

<p>I want output like below,</p>

<pre><code>1,n1,abcd,1234
2,n2,abrt,5666
3,h2,yyyy,123x// the missing first column value 3 should fill with second row first value
3,h2,yyyy,123y
3,h2,yyyy,1234
4,k1,yyyy,5234
4,22,yyyy,5234
</code></pre>

<p>How to implement this with help of AWK or some other alternate in shell script,please help.</p>