I have 800+ HTML files from which I need Code lines 50 - 100 from each file.
I tried Excel macros, terminal and textedit so far but with no luck.
I am looking for an automated solution.
I have 800+ HTML files from which I need Code lines 50 - 100 from each file.
I tried Excel macros, terminal and textedit so far but with no luck.
I am looking for an automated solution.
An example of using sed in a shell
oneliner
sed -i.bak -e '50,100d' *.html
remove lines 50-100 in all files with extension html, save a copy of the original file with a .bak extension.
or in a loop without -i
for file in *.html
do
sed -e '50,100d' "$file" > "$file".bak
done
best to take a full backup of all files before playing around with sed. and be . aware that sed is implemented with different options in various versions.