What sed version your using..?(guess its GNU sed..however) Post output of sed --version. And it also depends where your variable $ck_size is defined. Is it any kind of env variable and you run the sed command in the commmand line or all these sed and variable $ck_size are defined inside a script file..? However try.
GNU sed version 4.1.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
ck_size is not env variable.could you please help me.
Where do you run this sed command? At command prompt or it lies inside a file..? Did you get any output to the sed command in post# 5? As an alternate try with awk..
ck_size=5
awk -v d="$ck_size" 'NR==2{print "values is " d}1' inputfile