I have a big file (50G) and I would like to replace the lines starting with the content of variable $i with content of variable $newline using parallel command.
My script is given below
#!/bin/sh
File="test.txt"
i="foo"
newline="helooooooo"
parallel -a $File -k --block 30M --pipe-part 'sed -i /^$i/d' $File
echo $newline >> $File
It's not working for me, just deleting the line only.
parallel, why not just usesedto do all this by itself?