Find and Replace with Sed

#!/bin/bash # Find and Replace H2 to H1 in directory #`-s' #`--separate' # By default, `sed' will consider the files specified on the command # line as a single continuous long stream. This GNU `sed' extension # allows the user to consider them as separate files: range # addresses (such as `/abc/,/def/') are not allowed to span several # files, line numbers are relative to the start of each file, `$' # refers to the last line of each file, and files invoked from the # `R' commands are rewound at the start of each file. sed -i 's/<\/h2>/<\/h1>/g' *

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.