Conhecer o regex da linha vazia é ^$ , usando sed :
$ sed 's/^$/this is test/' file
abc
this is test
pqr
xyz
this is test
this is test
aaa
bbb
this is test
ccc
Usando awk , você pode confiar no número de elementos NF . Se este for 0 , defina a linha $0 como a string desejada:
$ awk '!NF{$0="this is test"}1' file