One way:
sed -e :a -e 's/^.\{1,29\}$/&0/;ta' -e n file
Match any character(.), and match 1 to 29 characters of the same type(1,29). If match successful, put a '0' behind the pattern matched(&
). When the match fails which means when the count of characters excluding the first character exceeds 29, stop it and hence we get the string zero padded by 30.
n
at the end simply reads the next line and prints it. This way the even numbered lines get printed untouched.
Executing the above script:
$ sed -e :a -e 's/^.\{1,29\}$/&0/;ta' -e n file
FSDFDSFSD000000000000000000000
FDSFD
FHGDHFDHGHFGHGHGF0000000000000
HHGDF
GFDGDFGFDG00000000000000000000
GFDGFDGFDGDFGDGD