I want to check in a file if the word "range 192.168.1.1 192.168.1.100" , if the word range exists in the line then I want to add another line "ip address dhcp" that should be above the line "range 192.168.1.1 192.168.1.100" as a result such as :
"range 192.168.1.1 192.168.1.100" as a result i get :
"ip address dhcp"
"range 192.168.1.1 192.168.1.100"
I tried with this regular expression: "sed -r /s/([[:space:]]*)/range/l\ip address dhcp"
but did not work for me !
Thanks in advance