I want to apply this sed command
sed \'/begin 644/,$d\' file1.txt > file1.txt
to all files of the directory.. basically I want to keep the h
You can use the edit in place sed option and the star selector like so
sed -i '/begin 644/,$d' *.txt