cat file | head -n 16482 | tail -n 258
using sed:
sed -n '16224,16482p' in.sql > out.sql
using awk:
awk 'NR>=16224&&NR<=16482' in.sql > out.sql
cat file | head -n 16482 | tail -n 258
using sed:
sed -n '16224,16482p' in.sql > out.sql
using awk:
awk 'NR>=16224&&NR<=16482' in.sql > out.sql
awk '/BEGIN/,/END/' info.txt
***** BEGIN ***** BASH is awesome BASH is awesome ***** END *****
awk '{$2="#"$2;print $0}' your_file
This will add # to the start of the second (space-separated) column regardless of which position it occurs at.
sed -r -e 's/^.{15}/&#/' file
Insert '#' in position 15
curl -s -o /dev/null -w "Conecction: %{time_connect}s | Start transfer: %{time_starttransfer}s | Total time: %{time_total}s\n" ...