Skip to main content
added 53 characters in body
Source Link
Petr Skocik
  • 29.7k
  • 18
  • 90
  • 155
sed '/Order allow,deny/ aAllow all' < yourFile

This will output the modified file to stdout. If you want to modify it in place then (sed(1)):

-i[SUFFIX], --in-place[=SUFFIX]

          edit files in place (makes backup if SUFFIX supplied)

Explanation:

For each line that matches `/Order allow,deny/`:
     Execute command 'a' (append) with 'Allow all' as parameter

http://grymoire.com/Unix/sed.html is an excellent resource to learn more about sed.

sed '/Order allow,deny/ aAllow all' < yourFile

This will output the modified file to stdout. If you want to modify it in place then:

-i[SUFFIX], --in-place[=SUFFIX]

          edit files in place (makes backup if SUFFIX supplied)

Explanation:

For each line that matches `/Order allow,deny/`:
     Execute command 'a' (append) with 'Allow all' as parameter

http://grymoire.com/Unix/sed.html is an excellent resource to learn more about sed.

sed '/Order allow,deny/ aAllow all' < yourFile

This will output the modified file to stdout. If you want to modify it in place then (sed(1)):

-i[SUFFIX], --in-place[=SUFFIX]

          edit files in place (makes backup if SUFFIX supplied)

Explanation:

For each line that matches `/Order allow,deny/`:
     Execute command 'a' (append) with 'Allow all' as parameter

http://grymoire.com/Unix/sed.html is an excellent resource to learn more about sed.

Source Link
Petr Skocik
  • 29.7k
  • 18
  • 90
  • 155

sed '/Order allow,deny/ aAllow all' < yourFile

This will output the modified file to stdout. If you want to modify it in place then:

-i[SUFFIX], --in-place[=SUFFIX]

          edit files in place (makes backup if SUFFIX supplied)

Explanation:

For each line that matches `/Order allow,deny/`:
     Execute command 'a' (append) with 'Allow all' as parameter

http://grymoire.com/Unix/sed.html is an excellent resource to learn more about sed.